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 STLPORT_LIB
 667 LIBZIP_CAN_USE_MMAP
 668 LIBDL
 669 LIBM
 670 USE_EXTERNAL_LCMS
 671 LCMS_LIBS
 672 LCMS_CFLAGS
 673 USE_EXTERNAL_LIBZ
 674 USE_EXTERNAL_LIBPNG
 675 PNG_LIBS
 676 PNG_CFLAGS
 677 USE_EXTERNAL_LIBGIF
 678 USE_EXTERNAL_LIBJPEG
 679 LLVM_LIBS
 680 LLVM_LDFLAGS
 681 LLVM_CFLAGS
 682 LLVM_CONFIG
 683 LIBFFI_LIB_FILE
 684 ENABLE_LIBFFI_BUNDLING
 685 LIBFFI_LIBS
 686 LIBFFI_CFLAGS
 687 ALSA_LIBS
 688 ALSA_CFLAGS
 689 FREETYPE_LICENSE
 690 FREETYPE_BUNDLE_LIB_PATH
 691 FREETYPE_LIBS
 692 FREETYPE_CFLAGS
 693 CUPS_CFLAGS
 694 X_EXTRA_LIBS
 695 X_LIBS
 696 X_PRE_LIBS
 697 X_CFLAGS
 698 XMKMF
 699 MSVCP_DLL
 700 MSVCR_DLL
 701 LIBCXX
 702 FIXPATH_DETACH_FLAG
 703 FIXPATH
 704 BUILD_GTEST
 705 ENABLE_CDS
 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_NO_EXEC_STACK
 727 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 728 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 729 OPENJDK_BUILD_JDKEXE_LIBS
 730 OPENJDK_BUILD_JDKLIB_LIBS
 731 OPENJDK_BUILD_LDFLAGS_JDKEXE
 732 OPENJDK_BUILD_LDFLAGS_JDKLIB
 733 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 734 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 735 OPENJDK_BUILD_CFLAGS_JDKEXE
 736 OPENJDK_BUILD_CFLAGS_JDKLIB
 737 OPENJDK_BUILD_CXXSTD_CXXFLAG
 738 JVM_LIBS
 739 JVM_ASFLAGS
 740 JVM_LDFLAGS
 741 JVM_CFLAGS
 742 LDFLAGS_NO_EXEC_STACK
 743 LDFLAGS_HASH_STYLE
 744 LDFLAGS_CXX_JDK
 745 JDKEXE_LIBS
 746 JDKLIB_LIBS
 747 LDFLAGS_JDKEXE
 748 LDFLAGS_JDKLIB
 749 CXXFLAGS_JDKEXE
 750 CXXFLAGS_JDKLIB
 751 CFLAGS_JDKEXE
 752 CFLAGS_JDKLIB
 753 MACOSX_VERSION_MAX
 754 MACOSX_VERSION_MIN
 755 CXXSTD_CXXFLAG
 756 JDK_ARCH_ABI_PROP_NAME
 757 CXX_O_FLAG_SIZE
 758 CXX_O_FLAG_NONE
 759 CXX_O_FLAG_DEBUG
 760 CXX_O_FLAG_NORM
 761 CXX_O_FLAG_HI
 762 CXX_O_FLAG_HIGHEST
 763 CXX_O_FLAG_HIGHEST_JVM
 764 C_O_FLAG_SIZE
 765 C_O_FLAG_NONE
 766 C_O_FLAG_DEBUG
 767 C_O_FLAG_NORM
 768 C_O_FLAG_HI
 769 C_O_FLAG_HIGHEST
 770 C_O_FLAG_HIGHEST_JVM
 771 JVM_CFLAGS_SYMBOLS
 772 CXXFLAGS_DEBUG_SYMBOLS
 773 CFLAGS_DEBUG_SYMBOLS
 774 CXX_FLAG_DEPS
 775 C_FLAG_DEPS
 776 SHARED_LIBRARY_FLAGS
 777 SET_SHARED_LIBRARY_MAPFILE
 778 SET_SHARED_LIBRARY_NAME
 779 SET_SHARED_LIBRARY_ORIGIN
 780 SET_EXECUTABLE_ORIGIN
 781 CXX_FLAG_REORDER
 782 C_FLAG_REORDER
 783 JVM_RCFLAGS
 784 RC_FLAGS
 785 AR_OUT_OPTION
 786 LD_OUT_OPTION
 787 EXE_OUT_OPTION
 788 CC_OUT_OPTION
 789 STRIPFLAGS
 790 ARFLAGS
 791 COMPILER_BINDCMD_FILE_FLAG
 792 COMPILER_COMMAND_FILE_FLAG
 793 COMPILER_TARGET_BITS_FLAG
 794 JIB_JAR
 795 JT_HOME
 796 JTREGEXE
 797 HOTSPOT_TOOLCHAIN_TYPE
 798 USING_BROKEN_SUSE_LD
 799 PACKAGE_PATH
 800 BUILD_AS
 801 BUILD_LDCXX
 802 BUILD_LD
 803 BUILD_STRIP
 804 BUILD_OBJCOPY
 805 BUILD_AR
 806 BUILD_NM
 807 BUILD_CXX
 808 BUILD_CC
 809 BUILD_SYSROOT_LDFLAGS
 810 BUILD_SYSROOT_CFLAGS
 811 ac_ct_OBJDUMP
 812 OBJDUMP
 813 ac_ct_OBJCOPY
 814 OBJCOPY
 815 ac_ct_NM
 816 ac_ct_STRIP
 817 GNM
 818 NM
 819 STRIP
 820 MSBUILD
 821 DUMPBIN
 822 RC
 823 MT
 824 LIPO
 825 ac_ct_AR
 826 AR
 827 AS
 828 LDCXX
 829 LD
 830 CXXCPP
 831 CPP
 832 CXX_VERSION_NUMBER
 833 CC_VERSION_NUMBER
 834 ac_ct_CXX
 835 CXXFLAGS
 836 CXX
 837 TOOLCHAIN_PATH_CXX
 838 POTENTIAL_CXX
 839 OBJEXT
 840 EXEEXT
 841 ac_ct_CC
 842 CPPFLAGS
 843 LDFLAGS
 844 CFLAGS
 845 CC
 846 TOOLCHAIN_PATH_CC
 847 POTENTIAL_CC
 848 TOOLCHAIN_VERSION
 849 VS_LIB
 850 VS_INCLUDE
 851 VS_PATH
 852 CYGWIN_LINK
 853 SYSROOT_LDFLAGS
 854 SYSROOT_CFLAGS
 855 EXTRA_LDFLAGS
 856 EXTRA_CXXFLAGS
 857 EXTRA_CFLAGS
 858 EXE_SUFFIX
 859 OBJ_SUFFIX
 860 STATIC_LIBRARY
 861 SHARED_LIBRARY
 862 STATIC_LIBRARY_SUFFIX
 863 SHARED_LIBRARY_SUFFIX
 864 LIBRARY_PREFIX
 865 TOOLCHAIN_TYPE
 866 STATIC_BUILD
 867 IMPORT_MODULES_MAKE
 868 IMPORT_MODULES_SRC
 869 IMPORT_MODULES_MAN
 870 IMPORT_MODULES_LEGAL
 871 IMPORT_MODULES_CONF
 872 IMPORT_MODULES_LIBS
 873 IMPORT_MODULES_CMDS
 874 IMPORT_MODULES_CLASSES
 875 EXTERNAL_BUILDJDK
 876 BUILD_JDK
 877 CREATE_BUILDJDK
 878 JLINK
 879 JMOD
 880 JAVAC_FLAGS
 881 BOOT_JDK_MODULAR
 882 BOOT_JDK_SOURCETARGET
 883 JARSIGNER
 884 JAR
 885 JAVAH
 886 JAVAC
 887 JAVA
 888 BOOT_JDK
 889 JAVA_CHECK
 890 JAVAC_CHECK
 891 VERSION_IS_GA
 892 VERSION_SHORT
 893 VERSION_STRING
 894 VERSION_NUMBER_FOUR_POSITIONS
 895 VERSION_NUMBER
 896 VERSION_OPT
 897 VERSION_BUILD
 898 VERSION_PRE
 899 VERSION_PATCH
 900 VERSION_SECURITY
 901 VERSION_MINOR
 902 VERSION_MAJOR
 903 MACOSX_BUNDLE_ID_BASE
 904 MACOSX_BUNDLE_NAME_BASE
 905 HOTSPOT_VM_DISTRO
 906 COMPANY_NAME
 907 JDK_RC_PLATFORM_NAME
 908 PRODUCT_SUFFIX
 909 PRODUCT_NAME
 910 LAUNCHER_NAME
 911 JLINK_KEEP_PACKAGED_MODULES
 912 COPYRIGHT_YEAR
 913 COMPRESS_JARS
 914 INCLUDE_SA
 915 UNLIMITED_CRYPTO
 916 CACERTS_FILE
 917 ENABLE_FULL_DOCS
 918 ENABLE_HEADLESS_ONLY
 919 DEFAULT_MAKE_TARGET
 920 OS_VERSION_MICRO
 921 OS_VERSION_MINOR
 922 OS_VERSION_MAJOR
 923 PKG_CONFIG
 924 BASH_ARGS
 925 SETFILE
 926 CODESIGN
 927 XATTR
 928 DSYMUTIL
 929 IS_GNU_TIME
 930 PATCH
 931 DTRACE
 932 FLOCK
 933 TIME
 934 STAT
 935 HG
 936 DOT
 937 READELF
 938 OTOOL
 939 LDD
 940 ZIPEXE
 941 UNZIP
 942 TAR_SUPPORTS_TRANSFORM
 943 TAR_INCLUDE_PARAM
 944 TAR_CREATE_EXTRA_PARAM
 945 TAR_TYPE
 946 FIND_DELETE
 947 OUTPUT_SYNC
 948 OUTPUT_SYNC_SUPPORTED
 949 CHECK_TOOLSDIR_MAKE
 950 CHECK_TOOLSDIR_GMAKE
 951 CHECK_MAKE
 952 CHECK_GMAKE
 953 MAKE
 954 PKGHANDLER
 955 CONFIGURESUPPORT_OUTPUTDIR
 956 OUTPUTDIR
 957 CONF_NAME
 958 SPEC
 959 SDKROOT
 960 XCODEBUILD
 961 JVM_VARIANT_MAIN
 962 VALID_JVM_VARIANTS
 963 JVM_VARIANTS
 964 DEBUG_LEVEL
 965 HOTSPOT_DEBUG_LEVEL
 966 JDK_VARIANT
 967 USERNAME
 968 CANONICAL_TOPDIR
 969 ORIGINAL_TOPDIR
 970 TOPDIR
 971 PATH_SEP
 972 HOTSPOT_BUILD_CPU_DEFINE
 973 HOTSPOT_BUILD_CPU_ARCH
 974 HOTSPOT_BUILD_CPU
 975 HOTSPOT_BUILD_OS_TYPE
 976 HOTSPOT_BUILD_OS
 977 OPENJDK_BUILD_BUNDLE_PLATFORM
 978 OPENJDK_BUILD_OS_EXPORT_DIR
 979 OPENJDK_BUILD_CPU_OSARCH
 980 OPENJDK_BUILD_CPU_ISADIR
 981 OPENJDK_BUILD_CPU_LEGACY_LIB
 982 OPENJDK_BUILD_CPU_LEGACY
 983 HOTSPOT_TARGET_CPU_DEFINE
 984 HOTSPOT_TARGET_CPU_ARCH
 985 HOTSPOT_TARGET_CPU
 986 HOTSPOT_TARGET_OS_TYPE
 987 HOTSPOT_TARGET_OS
 988 DEFINE_CROSS_COMPILE_ARCH
 989 OPENJDK_TARGET_BUNDLE_PLATFORM
 990 OPENJDK_TARGET_OS_EXPORT_DIR
 991 OPENJDK_TARGET_CPU_OSARCH
 992 OPENJDK_TARGET_CPU_ISADIR
 993 OPENJDK_TARGET_CPU_LEGACY_LIB
 994 OPENJDK_TARGET_CPU_LEGACY
 995 RELEASE_FILE_OS_ARCH
 996 RELEASE_FILE_OS_NAME
 997 OPENJDK_MODULE_TARGET_PLATFORM
 998 COMPILE_TYPE
 999 OPENJDK_TARGET_CPU_ENDIAN
1000 OPENJDK_TARGET_CPU_BITS
1001 OPENJDK_TARGET_CPU_ARCH
1002 OPENJDK_TARGET_CPU
1003 OPENJDK_TARGET_OS_ENV
1004 OPENJDK_TARGET_OS_TYPE
1005 OPENJDK_TARGET_OS
1006 OPENJDK_BUILD_CPU_ENDIAN
1007 OPENJDK_BUILD_CPU_BITS
1008 OPENJDK_BUILD_CPU_ARCH
1009 OPENJDK_BUILD_CPU
1010 OPENJDK_BUILD_OS_ENV
1011 OPENJDK_BUILD_OS_TYPE
1012 OPENJDK_BUILD_OS
1013 OPENJDK_BUILD_AUTOCONF_NAME
1014 OPENJDK_TARGET_AUTOCONF_NAME
1015 target_os
1016 target_vendor
1017 target_cpu
1018 target
1019 host_os
1020 host_vendor
1021 host_cpu
1022 host
1023 build_os
1024 build_vendor
1025 build_cpu
1026 build
1027 PANDOC
1028 NICE
1029 CPIO
1030 DF
1031 READLINK
1032 CYGPATH
1033 SED
1034 FGREP
1035 EGREP
1036 GREP
1037 AWK
1038 XARGS
1039 WHICH
1040 WC
1041 UNIQ
1042 UNAME
1043 TR
1044 TOUCH
1045 TEE
1046 TAR
1047 TAIL
1048 SORT
1049 SH
1050 RMDIR
1051 RM
1052 PRINTF
1053 NAWK
1054 MV
1055 MKTEMP
1056 MKDIR
1057 LS
1058 LN
1059 GZIP
1060 GUNZIP
1061 HEAD
1062 FIND
1063 FILE
1064 EXPR
1065 ECHO
1066 DIRNAME
1067 DIFF
1068 DATE
1069 CUT
1070 CP
1071 COMM
1072 CMP
1073 CHMOD
1074 CAT
1075 BASH
1076 BASENAME
1077 DATE_WHEN_CONFIGURED
1078 ORIGINAL_PATH
1079 CONFIGURE_COMMAND_LINE
1080 target_alias
1081 host_alias
1082 build_alias
1083 LIBS
1084 ECHO_T
1085 ECHO_N
1086 ECHO_C
1087 DEFS
1088 mandir
1089 localedir
1090 libdir
1091 psdir
1092 pdfdir
1093 dvidir
1094 htmldir
1095 infodir
1096 docdir
1097 oldincludedir
1098 includedir
1099 localstatedir
1100 sharedstatedir
1101 sysconfdir
1102 datadir
1103 datarootdir
1104 libexecdir
1105 sbindir
1106 bindir
1107 program_transform_name
1108 prefix
1109 exec_prefix
1110 PACKAGE_URL
1111 PACKAGE_BUGREPORT
1112 PACKAGE_STRING
1113 PACKAGE_VERSION
1114 PACKAGE_TARNAME
1115 PACKAGE_NAME
1116 PATH_SEPARATOR
1117 SHELL'
1118 ac_subst_files=''
1119 ac_user_opts='
1120 enable_option_checking
1121 with_target_bits
1122 enable_openjdk_only
1123 with_custom_make_dir
1124 with_jdk_variant
1125 enable_debug
1126 with_debug_level
1127 with_jvm_variants
1128 with_cpu_port
1129 with_devkit
1130 with_sys_root
1131 with_sysroot
1132 with_tools_dir
1133 with_toolchain_path
1134 with_extra_path
1135 with_sdk_name
1136 with_conf_name
1137 with_output_base_dir
1138 with_output_sync
1139 with_default_make_target
1140 enable_headless_only
1141 enable_full_docs
1142 with_cacerts_file
1143 enable_unlimited_crypto
1144 with_copyright_year
1145 enable_keep_packaged_modules
1146 with_milestone
1147 with_update_version
1148 with_user_release_suffix
1149 with_build_number
1150 with_version_string
1151 with_version_pre
1152 with_version_opt
1153 with_version_build
1154 with_version_major
1155 with_version_minor
1156 with_version_security
1157 with_version_patch
1158 with_boot_jdk
1159 with_build_jdk
1160 with_import_modules
1161 enable_static_build
1162 with_toolchain_type
1163 with_extra_cflags
1164 with_extra_cxxflags
1165 with_extra_ldflags
1166 with_toolchain_version
1167 with_build_devkit
1168 with_jtreg
1169 with_jib
1170 with_abi_profile
1171 with_macosx_version_max
1172 enable_warnings_as_errors
1173 with_native_debug_symbols
1174 enable_debug_symbols
1175 enable_zip_debug_info
1176 enable_native_coverage
1177 enable_dtrace
1178 enable_aot
1179 enable_cds
1180 enable_hotspot_gtest
1181 with_stdc__lib
1182 with_msvcr_dll
1183 with_msvcp_dll
1184 with_x
1185 with_cups
1186 with_cups_include
1187 with_freetype
1188 with_freetype_include
1189 with_freetype_lib
1190 with_freetype_src
1191 enable_freetype_bundling
1192 with_freetype_license
1193 with_alsa
1194 with_alsa_include
1195 with_alsa_lib
1196 with_libffi
1197 with_libffi_include
1198 with_libffi_lib
1199 enable_libffi_bundling
1200 with_libjpeg
1201 with_giflib
1202 with_libpng
1203 with_zlib
1204 with_lcms
1205 with_dxsdk
1206 with_dxsdk_lib
1207 with_dxsdk_include
1208 with_jvm_features
1209 with_jvm_interpreter
1210 enable_jtreg_failure_handler
1211 enable_generate_classlist
1212 with_num_cores
1213 with_memory_size
1214 with_jobs
1215 with_test_jobs
1216 with_boot_jdk_jvmargs
1217 with_sjavac_server_java
1218 enable_sjavac
1219 enable_javac_server
1220 enable_icecc
1221 enable_precompiled_headers
1222 enable_ccache
1223 with_ccache_dir
1224 '
1225       ac_precious_vars='build_alias
1226 host_alias
1227 target_alias
1228 BASENAME
1229 BASH
1230 CAT
1231 CHMOD
1232 CMP
1233 COMM
1234 CP
1235 CUT
1236 DATE
1237 DIFF
1238 DIRNAME
1239 ECHO
1240 EXPR
1241 FILE
1242 FIND
1243 HEAD
1244 GUNZIP
1245 GZIP
1246 LN
1247 LS
1248 MKDIR
1249 MKTEMP
1250 MV
1251 NAWK
1252 PRINTF
1253 RM
1254 RMDIR
1255 SH
1256 SORT
1257 TAIL
1258 TAR
1259 TEE
1260 TOUCH
1261 TR
1262 UNAME
1263 UNIQ
1264 WC
1265 WHICH
1266 XARGS
1267 AWK
1268 GREP
1269 EGREP
1270 FGREP
1271 SED
1272 CYGPATH
1273 READLINK
1274 DF
1275 CPIO
1276 NICE
1277 PANDOC
1278 MAKE
1279 UNZIP
1280 ZIPEXE
1281 LDD
1282 OTOOL
1283 READELF
1284 DOT
1285 HG
1286 STAT
1287 TIME
1288 FLOCK
1289 DTRACE
1290 PATCH
1291 DSYMUTIL
1292 XATTR
1293 CODESIGN
1294 SETFILE
1295 PKG_CONFIG
1296 JAVA
1297 JAVAC
1298 JAVAH
1299 JAR
1300 JARSIGNER
1301 CC
1302 CFLAGS
1303 LDFLAGS
1304 LIBS
1305 CPPFLAGS
1306 CXX
1307 CXXFLAGS
1308 CCC
1309 CPP
1310 CXXCPP
1311 AS
1312 AR
1313 LIPO
1314 STRIP
1315 NM
1316 GNM
1317 OBJCOPY
1318 OBJDUMP
1319 BUILD_CC
1320 BUILD_CXX
1321 BUILD_NM
1322 BUILD_AR
1323 BUILD_OBJCOPY
1324 BUILD_STRIP
1325 JTREGEXE
1326 XMKMF
1327 FREETYPE_CFLAGS
1328 FREETYPE_LIBS
1329 ALSA_CFLAGS
1330 ALSA_LIBS
1331 LIBFFI_CFLAGS
1332 LIBFFI_LIBS
1333 PNG_CFLAGS
1334 PNG_LIBS
1335 LCMS_CFLAGS
1336 LCMS_LIBS
1337 ICECC_CMD
1338 ICECC_CREATE_ENV
1339 ICECC_WRAPPER
1340 CCACHE'
1341 
1342 
1343 # Initialize some variables set by options.
1344 ac_init_help=
1345 ac_init_version=false
1346 ac_unrecognized_opts=
1347 ac_unrecognized_sep=
1348 # The variables have the same names as the options, with
1349 # dashes changed to underlines.
1350 cache_file=/dev/null
1351 exec_prefix=NONE
1352 no_create=
1353 no_recursion=
1354 prefix=NONE
1355 program_prefix=NONE
1356 program_suffix=NONE
1357 program_transform_name=s,x,x,
1358 silent=
1359 site=
1360 srcdir=
1361 verbose=
1362 x_includes=NONE
1363 x_libraries=NONE
1364 
1365 # Installation directory options.
1366 # These are left unexpanded so users can "make install exec_prefix=/foo"
1367 # and all the variables that are supposed to be based on exec_prefix
1368 # by default will actually change.
1369 # Use braces instead of parens because sh, perl, etc. also accept them.
1370 # (The list follows the same order as the GNU Coding Standards.)
1371 bindir='${exec_prefix}/bin'
1372 sbindir='${exec_prefix}/sbin'
1373 libexecdir='${exec_prefix}/libexec'
1374 datarootdir='${prefix}/share'
1375 datadir='${datarootdir}'
1376 sysconfdir='${prefix}/etc'
1377 sharedstatedir='${prefix}/com'
1378 localstatedir='${prefix}/var'
1379 includedir='${prefix}/include'
1380 oldincludedir='/usr/include'
1381 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1382 infodir='${datarootdir}/info'
1383 htmldir='${docdir}'
1384 dvidir='${docdir}'
1385 pdfdir='${docdir}'
1386 psdir='${docdir}'
1387 libdir='${exec_prefix}/lib'
1388 localedir='${datarootdir}/locale'
1389 mandir='${datarootdir}/man'
1390 
1391 ac_prev=
1392 ac_dashdash=
1393 for ac_option
1394 do
1395   # If the previous option needs an argument, assign it.
1396   if test -n "$ac_prev"; then
1397     eval $ac_prev=\$ac_option
1398     ac_prev=
1399     continue
1400   fi
1401 
1402   case $ac_option in
1403   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1404   *=)   ac_optarg= ;;
1405   *)    ac_optarg=yes ;;
1406   esac
1407 
1408   # Accept the important Cygnus configure options, so we can diagnose typos.
1409 
1410   case $ac_dashdash$ac_option in
1411   --)
1412     ac_dashdash=yes ;;
1413 
1414   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1415     ac_prev=bindir ;;
1416   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1417     bindir=$ac_optarg ;;
1418 
1419   -build | --build | --buil | --bui | --bu)
1420     ac_prev=build_alias ;;
1421   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1422     build_alias=$ac_optarg ;;
1423 
1424   -cache-file | --cache-file | --cache-fil | --cache-fi \
1425   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1426     ac_prev=cache_file ;;
1427   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1428   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1429     cache_file=$ac_optarg ;;
1430 
1431   --config-cache | -C)
1432     cache_file=config.cache ;;
1433 
1434   -datadir | --datadir | --datadi | --datad)
1435     ac_prev=datadir ;;
1436   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1437     datadir=$ac_optarg ;;
1438 
1439   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1440   | --dataroo | --dataro | --datar)
1441     ac_prev=datarootdir ;;
1442   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1443   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1444     datarootdir=$ac_optarg ;;
1445 
1446   -disable-* | --disable-*)
1447     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1448     # Reject names that are not valid shell variable names.
1449     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1450       as_fn_error $? "invalid feature name: $ac_useropt"
1451     ac_useropt_orig=$ac_useropt
1452     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1453     case $ac_user_opts in
1454       *"
1455 "enable_$ac_useropt"
1456 "*) ;;
1457       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1458          ac_unrecognized_sep=', ';;
1459     esac
1460     eval enable_$ac_useropt=no ;;
1461 
1462   -docdir | --docdir | --docdi | --doc | --do)
1463     ac_prev=docdir ;;
1464   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1465     docdir=$ac_optarg ;;
1466 
1467   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1468     ac_prev=dvidir ;;
1469   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1470     dvidir=$ac_optarg ;;
1471 
1472   -enable-* | --enable-*)
1473     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1474     # Reject names that are not valid shell variable names.
1475     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1476       as_fn_error $? "invalid feature name: $ac_useropt"
1477     ac_useropt_orig=$ac_useropt
1478     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1479     case $ac_user_opts in
1480       *"
1481 "enable_$ac_useropt"
1482 "*) ;;
1483       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1484          ac_unrecognized_sep=', ';;
1485     esac
1486     eval enable_$ac_useropt=\$ac_optarg ;;
1487 
1488   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1489   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1490   | --exec | --exe | --ex)
1491     ac_prev=exec_prefix ;;
1492   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1493   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1494   | --exec=* | --exe=* | --ex=*)
1495     exec_prefix=$ac_optarg ;;
1496 
1497   -gas | --gas | --ga | --g)
1498     # Obsolete; use --with-gas.
1499     with_gas=yes ;;
1500 
1501   -help | --help | --hel | --he | -h)
1502     ac_init_help=long ;;
1503   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1504     ac_init_help=recursive ;;
1505   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1506     ac_init_help=short ;;
1507 
1508   -host | --host | --hos | --ho)
1509     ac_prev=host_alias ;;
1510   -host=* | --host=* | --hos=* | --ho=*)
1511     host_alias=$ac_optarg ;;
1512 
1513   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1514     ac_prev=htmldir ;;
1515   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1516   | --ht=*)
1517     htmldir=$ac_optarg ;;
1518 
1519   -includedir | --includedir | --includedi | --included | --include \
1520   | --includ | --inclu | --incl | --inc)
1521     ac_prev=includedir ;;
1522   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1523   | --includ=* | --inclu=* | --incl=* | --inc=*)
1524     includedir=$ac_optarg ;;
1525 
1526   -infodir | --infodir | --infodi | --infod | --info | --inf)
1527     ac_prev=infodir ;;
1528   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1529     infodir=$ac_optarg ;;
1530 
1531   -libdir | --libdir | --libdi | --libd)
1532     ac_prev=libdir ;;
1533   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1534     libdir=$ac_optarg ;;
1535 
1536   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1537   | --libexe | --libex | --libe)
1538     ac_prev=libexecdir ;;
1539   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1540   | --libexe=* | --libex=* | --libe=*)
1541     libexecdir=$ac_optarg ;;
1542 
1543   -localedir | --localedir | --localedi | --localed | --locale)
1544     ac_prev=localedir ;;
1545   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1546     localedir=$ac_optarg ;;
1547 
1548   -localstatedir | --localstatedir | --localstatedi | --localstated \
1549   | --localstate | --localstat | --localsta | --localst | --locals)
1550     ac_prev=localstatedir ;;
1551   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1552   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1553     localstatedir=$ac_optarg ;;
1554 
1555   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1556     ac_prev=mandir ;;
1557   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1558     mandir=$ac_optarg ;;
1559 
1560   -nfp | --nfp | --nf)
1561     # Obsolete; use --without-fp.
1562     with_fp=no ;;
1563 
1564   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1565   | --no-cr | --no-c | -n)
1566     no_create=yes ;;
1567 
1568   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1569   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1570     no_recursion=yes ;;
1571 
1572   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1573   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1574   | --oldin | --oldi | --old | --ol | --o)
1575     ac_prev=oldincludedir ;;
1576   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1577   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1578   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1579     oldincludedir=$ac_optarg ;;
1580 
1581   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1582     ac_prev=prefix ;;
1583   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1584     prefix=$ac_optarg ;;
1585 
1586   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1587   | --program-pre | --program-pr | --program-p)
1588     ac_prev=program_prefix ;;
1589   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1590   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1591     program_prefix=$ac_optarg ;;
1592 
1593   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1594   | --program-suf | --program-su | --program-s)
1595     ac_prev=program_suffix ;;
1596   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1597   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1598     program_suffix=$ac_optarg ;;
1599 
1600   -program-transform-name | --program-transform-name \
1601   | --program-transform-nam | --program-transform-na \
1602   | --program-transform-n | --program-transform- \
1603   | --program-transform | --program-transfor \
1604   | --program-transfo | --program-transf \
1605   | --program-trans | --program-tran \
1606   | --progr-tra | --program-tr | --program-t)
1607     ac_prev=program_transform_name ;;
1608   -program-transform-name=* | --program-transform-name=* \
1609   | --program-transform-nam=* | --program-transform-na=* \
1610   | --program-transform-n=* | --program-transform-=* \
1611   | --program-transform=* | --program-transfor=* \
1612   | --program-transfo=* | --program-transf=* \
1613   | --program-trans=* | --program-tran=* \
1614   | --progr-tra=* | --program-tr=* | --program-t=*)
1615     program_transform_name=$ac_optarg ;;
1616 
1617   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1618     ac_prev=pdfdir ;;
1619   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1620     pdfdir=$ac_optarg ;;
1621 
1622   -psdir | --psdir | --psdi | --psd | --ps)
1623     ac_prev=psdir ;;
1624   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1625     psdir=$ac_optarg ;;
1626 
1627   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1628   | -silent | --silent | --silen | --sile | --sil)
1629     silent=yes ;;
1630 
1631   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1632     ac_prev=sbindir ;;
1633   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1634   | --sbi=* | --sb=*)
1635     sbindir=$ac_optarg ;;
1636 
1637   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1638   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1639   | --sharedst | --shareds | --shared | --share | --shar \
1640   | --sha | --sh)
1641     ac_prev=sharedstatedir ;;
1642   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1643   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1644   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1645   | --sha=* | --sh=*)
1646     sharedstatedir=$ac_optarg ;;
1647 
1648   -site | --site | --sit)
1649     ac_prev=site ;;
1650   -site=* | --site=* | --sit=*)
1651     site=$ac_optarg ;;
1652 
1653   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1654     ac_prev=srcdir ;;
1655   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1656     srcdir=$ac_optarg ;;
1657 
1658   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1659   | --syscon | --sysco | --sysc | --sys | --sy)
1660     ac_prev=sysconfdir ;;
1661   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1662   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1663     sysconfdir=$ac_optarg ;;
1664 
1665   -target | --target | --targe | --targ | --tar | --ta | --t)
1666     ac_prev=target_alias ;;
1667   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1668     target_alias=$ac_optarg ;;
1669 
1670   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1671     verbose=yes ;;
1672 
1673   -version | --version | --versio | --versi | --vers | -V)
1674     ac_init_version=: ;;
1675 
1676   -with-* | --with-*)
1677     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1678     # Reject names that are not valid shell variable names.
1679     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1680       as_fn_error $? "invalid package name: $ac_useropt"
1681     ac_useropt_orig=$ac_useropt
1682     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1683     case $ac_user_opts in
1684       *"
1685 "with_$ac_useropt"
1686 "*) ;;
1687       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1688          ac_unrecognized_sep=', ';;
1689     esac
1690     eval with_$ac_useropt=\$ac_optarg ;;
1691 
1692   -without-* | --without-*)
1693     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1694     # Reject names that are not valid shell variable names.
1695     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696       as_fn_error $? "invalid package name: $ac_useropt"
1697     ac_useropt_orig=$ac_useropt
1698     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699     case $ac_user_opts in
1700       *"
1701 "with_$ac_useropt"
1702 "*) ;;
1703       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1704          ac_unrecognized_sep=', ';;
1705     esac
1706     eval with_$ac_useropt=no ;;
1707 
1708   --x)
1709     # Obsolete; use --with-x.
1710     with_x=yes ;;
1711 
1712   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1713   | --x-incl | --x-inc | --x-in | --x-i)
1714     ac_prev=x_includes ;;
1715   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1716   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1717     x_includes=$ac_optarg ;;
1718 
1719   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1720   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1721     ac_prev=x_libraries ;;
1722   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1723   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1724     x_libraries=$ac_optarg ;;
1725 
1726   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1727 Try \`$0 --help' for more information"
1728     ;;
1729 
1730   *=*)
1731     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1732     # Reject names that are not valid shell variable names.
1733     case $ac_envvar in #(
1734       '' | [0-9]* | *[!_$as_cr_alnum]* )
1735       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1736     esac
1737     eval $ac_envvar=\$ac_optarg
1738     export $ac_envvar ;;
1739 
1740   *)
1741     # FIXME: should be removed in autoconf 3.0.
1742     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1743     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1744       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1745     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1746     ;;
1747 
1748   esac
1749 done
1750 
1751 if test -n "$ac_prev"; then
1752   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1753   as_fn_error $? "missing argument to $ac_option"
1754 fi
1755 
1756 if test -n "$ac_unrecognized_opts"; then
1757   case $enable_option_checking in
1758     no) ;;
1759     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1760     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1761   esac
1762 fi
1763 
1764 # Check all directory arguments for consistency.
1765 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1766                 datadir sysconfdir sharedstatedir localstatedir includedir \
1767                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1768                 libdir localedir mandir
1769 do
1770   eval ac_val=\$$ac_var
1771   # Remove trailing slashes.
1772   case $ac_val in
1773     */ )
1774       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1775       eval $ac_var=\$ac_val;;
1776   esac
1777   # Be sure to have absolute directory names.
1778   case $ac_val in
1779     [\\/$]* | ?:[\\/]* )  continue;;
1780     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1781   esac
1782   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1783 done
1784 
1785 # There might be people who depend on the old broken behavior: `$host'
1786 # used to hold the argument of --host etc.
1787 # FIXME: To remove some day.
1788 build=$build_alias
1789 host=$host_alias
1790 target=$target_alias
1791 
1792 # FIXME: To remove some day.
1793 if test "x$host_alias" != x; then
1794   if test "x$build_alias" = x; then
1795     cross_compiling=maybe
1796   elif test "x$build_alias" != "x$host_alias"; then
1797     cross_compiling=yes
1798   fi
1799 fi
1800 
1801 ac_tool_prefix=
1802 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1803 
1804 test "$silent" = yes && exec 6>/dev/null
1805 
1806 
1807 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1808 ac_ls_di=`ls -di .` &&
1809 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1810   as_fn_error $? "working directory cannot be determined"
1811 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1812   as_fn_error $? "pwd does not report name of working directory"
1813 
1814 
1815 # Find the source files, if location was not specified.
1816 if test -z "$srcdir"; then
1817   ac_srcdir_defaulted=yes
1818   # Try the directory containing this script, then the parent directory.
1819   ac_confdir=`$as_dirname -- "$as_myself" ||
1820 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1821          X"$as_myself" : 'X\(//\)[^/]' \| \
1822          X"$as_myself" : 'X\(//\)$' \| \
1823          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1824 $as_echo X"$as_myself" |
1825     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1826             s//\1/
1827             q
1828           }
1829           /^X\(\/\/\)[^/].*/{
1830             s//\1/
1831             q
1832           }
1833           /^X\(\/\/\)$/{
1834             s//\1/
1835             q
1836           }
1837           /^X\(\/\).*/{
1838             s//\1/
1839             q
1840           }
1841           s/.*/./; q'`
1842   srcdir=$ac_confdir
1843   if test ! -r "$srcdir/$ac_unique_file"; then
1844     srcdir=..
1845   fi
1846 else
1847   ac_srcdir_defaulted=no
1848 fi
1849 if test ! -r "$srcdir/$ac_unique_file"; then
1850   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1851   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1852 fi
1853 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1854 ac_abs_confdir=`(
1855         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1856         pwd)`
1857 # When building in place, set srcdir=.
1858 if test "$ac_abs_confdir" = "$ac_pwd"; then
1859   srcdir=.
1860 fi
1861 # Remove unnecessary trailing slashes from srcdir.
1862 # Double slashes in file names in object file debugging info
1863 # mess up M-x gdb in Emacs.
1864 case $srcdir in
1865 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1866 esac
1867 for ac_var in $ac_precious_vars; do
1868   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1869   eval ac_env_${ac_var}_value=\$${ac_var}
1870   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1871   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1872 done
1873 
1874 #
1875 # Report the --help message.
1876 #
1877 if test "$ac_init_help" = "long"; then
1878   # Omit some internal or obsolete options to make the list less imposing.
1879   # This message is too long to be a string in the A/UX 3.1 sh.
1880   cat <<_ACEOF
1881 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1882 
1883 Usage: $0 [OPTION]... [VAR=VALUE]...
1884 
1885 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1886 VAR=VALUE.  See below for descriptions of some of the useful variables.
1887 
1888 Defaults for the options are specified in brackets.
1889 
1890 Configuration:
1891   -h, --help              display this help and exit
1892       --help=short        display options specific to this package
1893       --help=recursive    display the short help of all the included packages
1894   -V, --version           display version information and exit
1895   -q, --quiet, --silent   do not print \`checking ...' messages
1896       --cache-file=FILE   cache test results in FILE [disabled]
1897   -C, --config-cache      alias for \`--cache-file=config.cache'
1898   -n, --no-create         do not create output files
1899       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1900 
1901 Installation directories:
1902   --prefix=PREFIX         install architecture-independent files in PREFIX
1903                           [$ac_default_prefix]
1904   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1905                           [PREFIX]
1906 
1907 By default, \`make install' will install all the files in
1908 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1909 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1910 for instance \`--prefix=\$HOME'.
1911 
1912 For better control, use the options below.
1913 
1914 Fine tuning of the installation directories:
1915   --bindir=DIR            user executables [EPREFIX/bin]
1916   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1917   --libexecdir=DIR        program executables [EPREFIX/libexec]
1918   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1919   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1920   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1921   --libdir=DIR            object code libraries [EPREFIX/lib]
1922   --includedir=DIR        C header files [PREFIX/include]
1923   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1924   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1925   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1926   --infodir=DIR           info documentation [DATAROOTDIR/info]
1927   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1928   --mandir=DIR            man documentation [DATAROOTDIR/man]
1929   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1930   --htmldir=DIR           html documentation [DOCDIR]
1931   --dvidir=DIR            dvi documentation [DOCDIR]
1932   --pdfdir=DIR            pdf documentation [DOCDIR]
1933   --psdir=DIR             ps documentation [DOCDIR]
1934 _ACEOF
1935 
1936   cat <<\_ACEOF
1937 
1938 X features:
1939   --x-includes=DIR    X include files are in DIR
1940   --x-libraries=DIR   X library files are in DIR
1941 
1942 System types:
1943   --build=BUILD     configure for building on BUILD [guessed]
1944   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1945   --target=TARGET   configure for building compilers for TARGET [HOST]
1946 _ACEOF
1947 fi
1948 
1949 if test -n "$ac_init_help"; then
1950   case $ac_init_help in
1951      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1952    esac
1953   cat <<\_ACEOF
1954 
1955 Optional Features:
1956   --disable-option-checking  ignore unrecognized --enable/--with options
1957   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1958   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1959   --enable-openjdk-only   suppress building custom source even if present
1960                           [disabled]
1961   --enable-debug          set the debug level to fastdebug (shorthand for
1962                           --with-debug-level=fastdebug) [disabled]
1963   --enable-headless-only  only build headless (no GUI) support [disabled]
1964   --enable-full-docs      build complete documentation [enabled if all tools
1965                           found]
1966   --disable-unlimited-crypto
1967                           Disable unlimited crypto policy [enabled]
1968   --disable-keep-packaged-modules
1969                           Do not keep packaged modules in jdk image [enable]
1970   --enable-static-build   enable static library build [disabled]
1971   --disable-warnings-as-errors
1972                           do not consider native warnings to be an error
1973                           [enabled]
1974   --enable-debug-symbols  Deprecated. Option is kept for backwards
1975                           compatibility and is ignored
1976   --enable-zip-debug-info Deprecated. Option is kept for backwards
1977                           compatibility and is ignored
1978   --enable-native-coverage
1979                           enable native compilation with code coverage
1980                           data[disabled]
1981   --enable-dtrace[=yes/no/auto]
1982                           enable dtrace. Default is auto, where dtrace is
1983                           enabled if all dependencies are present.
1984   --enable-aot[=yes/no/auto]
1985                           enable ahead of time compilation feature. Default is
1986                           auto, where aot is enabled if all dependencies are
1987                           present.
1988   --enable-cds[=yes/no]   enable class data sharing feature in non-minimal VM.
1989                           Default is yes.
1990   --disable-hotspot-gtest Disables building of the Hotspot unit tests
1991   --disable-freetype-bundling
1992                           disable bundling of the freetype library with the
1993                           build result [enabled on Windows or when using
1994                           --with-freetype, disabled otherwise]
1995   --enable-libffi-bundling
1996                           enable bundling of libffi.so to make the built JDK
1997                           runnable on more systems
1998   --enable-jtreg-failure-handler
1999                           forces build of the jtreg failure handler to be
2000                           enabled, missing dependencies become fatal errors.
2001                           Default is auto, where the failure handler is built
2002                           if all dependencies are present and otherwise just
2003                           disabled.
2004   --disable-generate-classlist
2005                           forces enabling or disabling of the generation of a
2006                           CDS classlist at build time. Default is to generate
2007                           it when either the server or client JVMs are built
2008                           and enable-cds is true.
2009   --enable-sjavac         use sjavac to do fast incremental compiles
2010                           [disabled]
2011   --disable-javac-server  disable javac server [enabled]
2012   --enable-icecc          enable distribted compilation of native code using
2013                           icecc/icecream [disabled]
2014   --disable-precompiled-headers
2015                           disable using precompiled headers when compiling C++
2016                           [enabled]
2017   --enable-ccache         enable using ccache to speed up recompilations
2018                           [disabled]
2019 
2020 Optional Packages:
2021   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2022   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2023   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2024                           support it), e.g. --with-target-bits=32 [guessed]
2025   --with-custom-make-dir  Deprecated. Option is kept for backwards
2026                           compatibility and is ignored
2027   --with-jdk-variant      JDK variant to build (normal) [normal]
2028   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2029                           optimized) [release]
2030   --with-jvm-variants     JVM variants (separated by commas) to build
2031                           (server,client,minimal,core,zero,zeroshark,custom)
2032                           [server]
2033   --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2034                           (arm64,aarch64) [aarch64]
2035   --with-devkit           use this devkit for compilers, tools and resources
2036   --with-sys-root         alias for --with-sysroot for backwards compatability
2037   --with-sysroot          use this directory as sysroot
2038   --with-tools-dir        alias for --with-toolchain-path for backwards
2039                           compatibility
2040   --with-toolchain-path   prepend these directories when searching for
2041                           toolchain binaries (compilers etc)
2042   --with-extra-path       prepend these directories to the default path
2043   --with-sdk-name         use the platform SDK of the given name. [macosx]
2044   --with-conf-name        use this as the name of the configuration [generated
2045                           from important configuration options]
2046   --with-output-base-dir  override the default output base directory [./build]
2047   --with-output-sync      set make output sync type if supported by make.
2048                           [recurse]
2049   --with-default-make-target
2050                           set the default make target [exploded-image]
2051   --with-cacerts-file     specify alternative cacerts file
2052   --with-copyright-year   Set copyright year value for build [current year]
2053   --with-milestone        Deprecated. Option is kept for backwards
2054                           compatibility and is ignored
2055   --with-update-version   Deprecated. Option is kept for backwards
2056                           compatibility and is ignored
2057   --with-user-release-suffix
2058                           Deprecated. Option is kept for backwards
2059                           compatibility and is ignored
2060   --with-build-number     Deprecated. Option is kept for backwards
2061                           compatibility and is ignored
2062   --with-version-string   Set version string [calculated]
2063   --with-version-pre      Set the base part of the version 'PRE' field
2064                           (pre-release identifier) ['internal']
2065   --with-version-opt      Set version 'OPT' field (build metadata)
2066                           [<timestamp>.<user>.<dirname>]
2067   --with-version-build    Set version 'BUILD' field (build number) [not
2068                           specified]
2069   --with-version-major    Set version 'MAJOR' field (first number) [current
2070                           source value]
2071   --with-version-minor    Set version 'MINOR' field (second number) [current
2072                           source value]
2073   --with-version-security Set version 'SECURITY' field (third number) [current
2074                           source value]
2075   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2076                           specified]
2077   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2078   --with-build-jdk        path to JDK of same version as is being built[the
2079                           newly built JDK]
2080   --with-import-modules   import a set of prebuilt modules either as a zip
2081                           file or an exploded directory
2082   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2083                           to show possible values [platform dependent]
2084   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2085   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2086   --with-extra-ldflags    extra flags to be used when linking jdk
2087   --with-toolchain-version
2088                           the version of the toolchain to look for, use
2089                           '--help' to show possible values [platform
2090                           dependent]
2091   --with-build-devkit     Devkit to use for the build platform toolchain
2092   --with-jtreg            Regression Test Harness [probed]
2093   --with-jib              Jib dependency management tool [not used]
2094   --with-abi-profile      specify ABI profile for ARM builds
2095                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2096                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2097                           [toolchain dependent]
2098   --with-macosx-version-max
2099                           error on use of newer functionality. [macosx]
2100   --with-native-debug-symbols
2101                           set the native debug symbol configuration (none,
2102                           internal, external, zipped) [varying]
2103   --with-stdc++lib=<static>,<dynamic>,<default>
2104                           force linking of the C++ runtime on Linux to either
2105                           static or dynamic, default is static with dynamic as
2106                           fallback
2107   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2108                           (Windows only) [probed]
2109   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2110                           (Windows only) [probed]
2111   --with-x                use the X Window System
2112   --with-cups             specify prefix directory for the cups package
2113                           (expecting the headers under PATH/include)
2114   --with-cups-include     specify directory for the cups include files
2115   --with-freetype         specify prefix directory for the freetype package
2116                           (expecting the libraries under PATH/lib and the
2117                           headers under PATH/include)
2118   --with-freetype-include specify directory for the freetype include files
2119   --with-freetype-lib     specify directory for the freetype library
2120   --with-freetype-src     specify directory with freetype sources to
2121                           automatically build the library (experimental,
2122                           Windows-only)
2123   --with-freetype-license if bundling freetype, also bundle this license file
2124   --with-alsa             specify prefix directory for the alsa package
2125                           (expecting the libraries under PATH/lib and the
2126                           headers under PATH/include)
2127   --with-alsa-include     specify directory for the alsa include files
2128   --with-alsa-lib         specify directory for the alsa library
2129   --with-libffi           specify prefix directory for the libffi package
2130                           (expecting the libraries under PATH/lib and the
2131                           headers under PATH/include)
2132   --with-libffi-include   specify directory for the libffi include files
2133   --with-libffi-lib       specify directory for the libffi library
2134   --with-libjpeg          use libjpeg from build system or OpenJDK source
2135                           (system, bundled) [bundled]
2136   --with-giflib           use giflib from build system or OpenJDK source
2137                           (system, bundled) [bundled]
2138   --with-libpng           use libpng from build system or OpenJDK source
2139                           (system, bundled) [bundled]
2140   --with-zlib             use zlib from build system or OpenJDK source
2141                           (system, bundled) [bundled]
2142   --with-lcms             use lcms2 from build system or OpenJDK source
2143                           (system, bundled) [bundled]
2144   --with-dxsdk            Deprecated. Option is kept for backwards
2145                           compatibility and is ignored
2146   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2147                           compatibility and is ignored
2148   --with-dxsdk-include    Deprecated. Option is kept for backwards
2149                           compatibility and is ignored
2150   --with-jvm-features     additional JVM features to enable (separated by
2151                           comma), use '--help' to show possible values [none]
2152   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2153                           compatibility and is ignored
2154   --with-num-cores        number of cores in the build system, e.g.
2155                           --with-num-cores=8 [probed]
2156   --with-memory-size      memory (in MB) available in the build system, e.g.
2157                           --with-memory-size=1024 [probed]
2158   --with-jobs             number of parallel jobs to let make run [calculated
2159                           based on cores and memory]
2160   --with-test-jobs        number of parallel tests jobs to run [based on build
2161                           jobs]
2162   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2163                           invocations of boot JDK, overriding the default
2164                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2165                           -enableassertions"
2166   --with-sjavac-server-java
2167                           use this java binary for running the sjavac
2168                           background server [Boot JDK java]
2169   --with-ccache-dir       where to store ccache files [~/.ccache]
2170 
2171 Some influential environment variables:
2172   BASENAME    Override default value for BASENAME
2173   BASH        Override default value for BASH
2174   CAT         Override default value for CAT
2175   CHMOD       Override default value for CHMOD
2176   CMP         Override default value for CMP
2177   COMM        Override default value for COMM
2178   CP          Override default value for CP
2179   CUT         Override default value for CUT
2180   DATE        Override default value for DATE
2181   DIFF        Override default value for DIFF
2182   DIRNAME     Override default value for DIRNAME
2183   ECHO        Override default value for ECHO
2184   EXPR        Override default value for EXPR
2185   FILE        Override default value for FILE
2186   FIND        Override default value for FIND
2187   HEAD        Override default value for HEAD
2188   GUNZIP      Override default value for GUNZIP
2189   GZIP        Override default value for GZIP
2190   LN          Override default value for LN
2191   LS          Override default value for LS
2192   MKDIR       Override default value for MKDIR
2193   MKTEMP      Override default value for MKTEMP
2194   MV          Override default value for MV
2195   NAWK        Override default value for NAWK
2196   PRINTF      Override default value for PRINTF
2197   RM          Override default value for RM
2198   RMDIR       Override default value for RMDIR
2199   SH          Override default value for SH
2200   SORT        Override default value for SORT
2201   TAIL        Override default value for TAIL
2202   TAR         Override default value for TAR
2203   TEE         Override default value for TEE
2204   TOUCH       Override default value for TOUCH
2205   TR          Override default value for TR
2206   UNAME       Override default value for UNAME
2207   UNIQ        Override default value for UNIQ
2208   WC          Override default value for WC
2209   WHICH       Override default value for WHICH
2210   XARGS       Override default value for XARGS
2211   AWK         Override default value for AWK
2212   GREP        Override default value for GREP
2213   EGREP       Override default value for EGREP
2214   FGREP       Override default value for FGREP
2215   SED         Override default value for SED
2216   CYGPATH     Override default value for CYGPATH
2217   READLINK    Override default value for READLINK
2218   DF          Override default value for DF
2219   CPIO        Override default value for CPIO
2220   NICE        Override default value for NICE
2221   PANDOC      Override default value for PANDOC
2222   MAKE        Override default value for MAKE
2223   UNZIP       Override default value for UNZIP
2224   ZIPEXE      Override default value for ZIPEXE
2225   LDD         Override default value for LDD
2226   OTOOL       Override default value for OTOOL
2227   READELF     Override default value for READELF
2228   DOT         Override default value for DOT
2229   HG          Override default value for HG
2230   STAT        Override default value for STAT
2231   TIME        Override default value for TIME
2232   FLOCK       Override default value for FLOCK
2233   DTRACE      Override default value for DTRACE
2234   PATCH       Override default value for PATCH
2235   DSYMUTIL    Override default value for DSYMUTIL
2236   XATTR       Override default value for XATTR
2237   CODESIGN    Override default value for CODESIGN
2238   SETFILE     Override default value for SETFILE
2239   PKG_CONFIG  path to pkg-config utility
2240   JAVA        Override default value for JAVA
2241   JAVAC       Override default value for JAVAC
2242   JAVAH       Override default value for JAVAH
2243   JAR         Override default value for JAR
2244   JARSIGNER   Override default value for JARSIGNER
2245   CC          C compiler command
2246   CFLAGS      C compiler flags
2247   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2248               nonstandard directory <lib dir>
2249   LIBS        libraries to pass to the linker, e.g. -l<library>
2250   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2251               you have headers in a nonstandard directory <include dir>
2252   CXX         C++ compiler command
2253   CXXFLAGS    C++ compiler flags
2254   CPP         C preprocessor
2255   CXXCPP      C++ preprocessor
2256   AS          Override default value for AS
2257   AR          Override default value for AR
2258   LIPO        Override default value for LIPO
2259   STRIP       Override default value for STRIP
2260   NM          Override default value for NM
2261   GNM         Override default value for GNM
2262   OBJCOPY     Override default value for OBJCOPY
2263   OBJDUMP     Override default value for OBJDUMP
2264   BUILD_CC    Override default value for BUILD_CC
2265   BUILD_CXX   Override default value for BUILD_CXX
2266   BUILD_NM    Override default value for BUILD_NM
2267   BUILD_AR    Override default value for BUILD_AR
2268   BUILD_OBJCOPY
2269               Override default value for BUILD_OBJCOPY
2270   BUILD_STRIP Override default value for BUILD_STRIP
2271   JTREGEXE    Override default value for JTREGEXE
2272   XMKMF       Path to xmkmf, Makefile generator for X Window System
2273   FREETYPE_CFLAGS
2274               C compiler flags for FREETYPE, overriding pkg-config
2275   FREETYPE_LIBS
2276               linker flags for FREETYPE, overriding pkg-config
2277   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2278   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2279   LIBFFI_CFLAGS
2280               C compiler flags for LIBFFI, overriding pkg-config
2281   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2282   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2283   PNG_LIBS    linker flags for PNG, overriding pkg-config
2284   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2285   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2286   ICECC_CMD   Override default value for ICECC_CMD
2287   ICECC_CREATE_ENV
2288               Override default value for ICECC_CREATE_ENV
2289   ICECC_WRAPPER
2290               Override default value for ICECC_WRAPPER
2291   CCACHE      Override default value for CCACHE
2292 
2293 Use these variables to override the choices made by `configure' or to help
2294 it to find libraries and programs with nonstandard names/locations.
2295 
2296 Report bugs to <build-dev@openjdk.java.net>.
2297 OpenJDK home page: <http://openjdk.java.net>.
2298 _ACEOF
2299 ac_status=$?
2300 fi
2301 
2302 if test "$ac_init_help" = "recursive"; then
2303   # If there are subdirs, report their specific --help.
2304   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2305     test -d "$ac_dir" ||
2306       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2307       continue
2308     ac_builddir=.
2309 
2310 case "$ac_dir" in
2311 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2312 *)
2313   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2314   # A ".." for each directory in $ac_dir_suffix.
2315   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2316   case $ac_top_builddir_sub in
2317   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2318   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2319   esac ;;
2320 esac
2321 ac_abs_top_builddir=$ac_pwd
2322 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2323 # for backward compatibility:
2324 ac_top_builddir=$ac_top_build_prefix
2325 
2326 case $srcdir in
2327   .)  # We are building in place.
2328     ac_srcdir=.
2329     ac_top_srcdir=$ac_top_builddir_sub
2330     ac_abs_top_srcdir=$ac_pwd ;;
2331   [\\/]* | ?:[\\/]* )  # Absolute name.
2332     ac_srcdir=$srcdir$ac_dir_suffix;
2333     ac_top_srcdir=$srcdir
2334     ac_abs_top_srcdir=$srcdir ;;
2335   *) # Relative name.
2336     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2337     ac_top_srcdir=$ac_top_build_prefix$srcdir
2338     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2339 esac
2340 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2341 
2342     cd "$ac_dir" || { ac_status=$?; continue; }
2343     # Check for guested configure.
2344     if test -f "$ac_srcdir/configure.gnu"; then
2345       echo &&
2346       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2347     elif test -f "$ac_srcdir/configure"; then
2348       echo &&
2349       $SHELL "$ac_srcdir/configure" --help=recursive
2350     else
2351       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2352     fi || ac_status=$?
2353     cd "$ac_pwd" || { ac_status=$?; break; }
2354   done
2355 fi
2356 
2357 test -n "$ac_init_help" && exit $ac_status
2358 if $ac_init_version; then
2359   cat <<\_ACEOF
2360 OpenJDK configure jdk9
2361 generated by GNU Autoconf 2.69
2362 
2363 Copyright (C) 2012 Free Software Foundation, Inc.
2364 This configure script is free software; the Free Software Foundation
2365 gives unlimited permission to copy, distribute and modify it.
2366 _ACEOF
2367   exit
2368 fi
2369 
2370 ## ------------------------ ##
2371 ## Autoconf initialization. ##
2372 ## ------------------------ ##
2373 
2374 # ac_fn_c_try_compile LINENO
2375 # --------------------------
2376 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2377 ac_fn_c_try_compile ()
2378 {
2379   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2380   rm -f conftest.$ac_objext
2381   if { { ac_try="$ac_compile"
2382 case "(($ac_try" in
2383   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2384   *) ac_try_echo=$ac_try;;
2385 esac
2386 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2387 $as_echo "$ac_try_echo"; } >&5
2388   (eval "$ac_compile") 2>conftest.err
2389   ac_status=$?
2390   if test -s conftest.err; then
2391     grep -v '^ *+' conftest.err >conftest.er1
2392     cat conftest.er1 >&5
2393     mv -f conftest.er1 conftest.err
2394   fi
2395   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2396   test $ac_status = 0; } && {
2397          test -z "$ac_c_werror_flag" ||
2398          test ! -s conftest.err
2399        } && test -s conftest.$ac_objext; then :
2400   ac_retval=0
2401 else
2402   $as_echo "$as_me: failed program was:" >&5
2403 sed 's/^/| /' conftest.$ac_ext >&5
2404 
2405         ac_retval=1
2406 fi
2407   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2408   as_fn_set_status $ac_retval
2409 
2410 } # ac_fn_c_try_compile
2411 
2412 # ac_fn_cxx_try_compile LINENO
2413 # ----------------------------
2414 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2415 ac_fn_cxx_try_compile ()
2416 {
2417   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418   rm -f conftest.$ac_objext
2419   if { { ac_try="$ac_compile"
2420 case "(($ac_try" in
2421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2422   *) ac_try_echo=$ac_try;;
2423 esac
2424 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2425 $as_echo "$ac_try_echo"; } >&5
2426   (eval "$ac_compile") 2>conftest.err
2427   ac_status=$?
2428   if test -s conftest.err; then
2429     grep -v '^ *+' conftest.err >conftest.er1
2430     cat conftest.er1 >&5
2431     mv -f conftest.er1 conftest.err
2432   fi
2433   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2434   test $ac_status = 0; } && {
2435          test -z "$ac_cxx_werror_flag" ||
2436          test ! -s conftest.err
2437        } && test -s conftest.$ac_objext; then :
2438   ac_retval=0
2439 else
2440   $as_echo "$as_me: failed program was:" >&5
2441 sed 's/^/| /' conftest.$ac_ext >&5
2442 
2443         ac_retval=1
2444 fi
2445   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2446   as_fn_set_status $ac_retval
2447 
2448 } # ac_fn_cxx_try_compile
2449 
2450 # ac_fn_c_try_cpp LINENO
2451 # ----------------------
2452 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2453 ac_fn_c_try_cpp ()
2454 {
2455   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456   if { { ac_try="$ac_cpp conftest.$ac_ext"
2457 case "(($ac_try" in
2458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2459   *) ac_try_echo=$ac_try;;
2460 esac
2461 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2462 $as_echo "$ac_try_echo"; } >&5
2463   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2464   ac_status=$?
2465   if test -s conftest.err; then
2466     grep -v '^ *+' conftest.err >conftest.er1
2467     cat conftest.er1 >&5
2468     mv -f conftest.er1 conftest.err
2469   fi
2470   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2471   test $ac_status = 0; } > conftest.i && {
2472          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2473          test ! -s conftest.err
2474        }; then :
2475   ac_retval=0
2476 else
2477   $as_echo "$as_me: failed program was:" >&5
2478 sed 's/^/| /' conftest.$ac_ext >&5
2479 
2480     ac_retval=1
2481 fi
2482   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2483   as_fn_set_status $ac_retval
2484 
2485 } # ac_fn_c_try_cpp
2486 
2487 # ac_fn_cxx_try_cpp LINENO
2488 # ------------------------
2489 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2490 ac_fn_cxx_try_cpp ()
2491 {
2492   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2493   if { { ac_try="$ac_cpp conftest.$ac_ext"
2494 case "(($ac_try" in
2495   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2496   *) ac_try_echo=$ac_try;;
2497 esac
2498 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2499 $as_echo "$ac_try_echo"; } >&5
2500   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2501   ac_status=$?
2502   if test -s conftest.err; then
2503     grep -v '^ *+' conftest.err >conftest.er1
2504     cat conftest.er1 >&5
2505     mv -f conftest.er1 conftest.err
2506   fi
2507   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2508   test $ac_status = 0; } > conftest.i && {
2509          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2510          test ! -s conftest.err
2511        }; then :
2512   ac_retval=0
2513 else
2514   $as_echo "$as_me: failed program was:" >&5
2515 sed 's/^/| /' conftest.$ac_ext >&5
2516 
2517     ac_retval=1
2518 fi
2519   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2520   as_fn_set_status $ac_retval
2521 
2522 } # ac_fn_cxx_try_cpp
2523 
2524 # ac_fn_c_try_link LINENO
2525 # -----------------------
2526 # Try to link conftest.$ac_ext, and return whether this succeeded.
2527 ac_fn_c_try_link ()
2528 {
2529   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2530   rm -f conftest.$ac_objext conftest$ac_exeext
2531   if { { ac_try="$ac_link"
2532 case "(($ac_try" in
2533   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2534   *) ac_try_echo=$ac_try;;
2535 esac
2536 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2537 $as_echo "$ac_try_echo"; } >&5
2538   (eval "$ac_link") 2>conftest.err
2539   ac_status=$?
2540   if test -s conftest.err; then
2541     grep -v '^ *+' conftest.err >conftest.er1
2542     cat conftest.er1 >&5
2543     mv -f conftest.er1 conftest.err
2544   fi
2545   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2546   test $ac_status = 0; } && {
2547          test -z "$ac_c_werror_flag" ||
2548          test ! -s conftest.err
2549        } && test -s conftest$ac_exeext && {
2550          test "$cross_compiling" = yes ||
2551          test -x conftest$ac_exeext
2552        }; then :
2553   ac_retval=0
2554 else
2555   $as_echo "$as_me: failed program was:" >&5
2556 sed 's/^/| /' conftest.$ac_ext >&5
2557 
2558         ac_retval=1
2559 fi
2560   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2561   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2562   # interfere with the next link command; also delete a directory that is
2563   # left behind by Apple's compiler.  We do this before executing the actions.
2564   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2565   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2566   as_fn_set_status $ac_retval
2567 
2568 } # ac_fn_c_try_link
2569 
2570 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2571 # ---------------------------------------------------------
2572 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2573 # the include files in INCLUDES and setting the cache variable VAR
2574 # accordingly.
2575 ac_fn_cxx_check_header_mongrel ()
2576 {
2577   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2578   if eval \${$3+:} false; then :
2579   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2580 $as_echo_n "checking for $2... " >&6; }
2581 if eval \${$3+:} false; then :
2582   $as_echo_n "(cached) " >&6
2583 fi
2584 eval ac_res=\$$3
2585                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2586 $as_echo "$ac_res" >&6; }
2587 else
2588   # Is the header compilable?
2589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2590 $as_echo_n "checking $2 usability... " >&6; }
2591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2592 /* end confdefs.h.  */
2593 $4
2594 #include <$2>
2595 _ACEOF
2596 if ac_fn_cxx_try_compile "$LINENO"; then :
2597   ac_header_compiler=yes
2598 else
2599   ac_header_compiler=no
2600 fi
2601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2603 $as_echo "$ac_header_compiler" >&6; }
2604 
2605 # Is the header present?
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2607 $as_echo_n "checking $2 presence... " >&6; }
2608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609 /* end confdefs.h.  */
2610 #include <$2>
2611 _ACEOF
2612 if ac_fn_cxx_try_cpp "$LINENO"; then :
2613   ac_header_preproc=yes
2614 else
2615   ac_header_preproc=no
2616 fi
2617 rm -f conftest.err conftest.i conftest.$ac_ext
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2619 $as_echo "$ac_header_preproc" >&6; }
2620 
2621 # So?  What about this header?
2622 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2623   yes:no: )
2624     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2625 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2626     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2627 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2628     ;;
2629   no:yes:* )
2630     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2631 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2632     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2633 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2634     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2635 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2636     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2637 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2638     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2639 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2640 ( $as_echo "## ----------------------------------------- ##
2641 ## Report this to build-dev@openjdk.java.net ##
2642 ## ----------------------------------------- ##"
2643      ) | sed "s/^/$as_me: WARNING:     /" >&2
2644     ;;
2645 esac
2646   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2647 $as_echo_n "checking for $2... " >&6; }
2648 if eval \${$3+:} false; then :
2649   $as_echo_n "(cached) " >&6
2650 else
2651   eval "$3=\$ac_header_compiler"
2652 fi
2653 eval ac_res=\$$3
2654                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2655 $as_echo "$ac_res" >&6; }
2656 fi
2657   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2658 
2659 } # ac_fn_cxx_check_header_mongrel
2660 
2661 # ac_fn_cxx_try_run LINENO
2662 # ------------------------
2663 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2664 # that executables *can* be run.
2665 ac_fn_cxx_try_run ()
2666 {
2667   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2668   if { { ac_try="$ac_link"
2669 case "(($ac_try" in
2670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2671   *) ac_try_echo=$ac_try;;
2672 esac
2673 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2674 $as_echo "$ac_try_echo"; } >&5
2675   (eval "$ac_link") 2>&5
2676   ac_status=$?
2677   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2678   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2679   { { case "(($ac_try" in
2680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2681   *) ac_try_echo=$ac_try;;
2682 esac
2683 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2684 $as_echo "$ac_try_echo"; } >&5
2685   (eval "$ac_try") 2>&5
2686   ac_status=$?
2687   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2688   test $ac_status = 0; }; }; then :
2689   ac_retval=0
2690 else
2691   $as_echo "$as_me: program exited with status $ac_status" >&5
2692        $as_echo "$as_me: failed program was:" >&5
2693 sed 's/^/| /' conftest.$ac_ext >&5
2694 
2695        ac_retval=$ac_status
2696 fi
2697   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2698   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2699   as_fn_set_status $ac_retval
2700 
2701 } # ac_fn_cxx_try_run
2702 
2703 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2704 # ---------------------------------------------------------
2705 # Tests whether HEADER exists and can be compiled using the include files in
2706 # INCLUDES, setting the cache variable VAR accordingly.
2707 ac_fn_cxx_check_header_compile ()
2708 {
2709   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2710   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2711 $as_echo_n "checking for $2... " >&6; }
2712 if eval \${$3+:} false; then :
2713   $as_echo_n "(cached) " >&6
2714 else
2715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2716 /* end confdefs.h.  */
2717 $4
2718 #include <$2>
2719 _ACEOF
2720 if ac_fn_cxx_try_compile "$LINENO"; then :
2721   eval "$3=yes"
2722 else
2723   eval "$3=no"
2724 fi
2725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2726 fi
2727 eval ac_res=\$$3
2728                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2729 $as_echo "$ac_res" >&6; }
2730   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2731 
2732 } # ac_fn_cxx_check_header_compile
2733 
2734 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2735 # ----------------------------------------------
2736 # Tries to find the compile-time value of EXPR in a program that includes
2737 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2738 # computed
2739 ac_fn_cxx_compute_int ()
2740 {
2741   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2742   if test "$cross_compiling" = yes; then
2743     # Depending upon the size, compute the lo and hi bounds.
2744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2745 /* end confdefs.h.  */
2746 $4
2747 int
2748 main ()
2749 {
2750 static int test_array [1 - 2 * !(($2) >= 0)];
2751 test_array [0] = 0;
2752 return test_array [0];
2753 
2754   ;
2755   return 0;
2756 }
2757 _ACEOF
2758 if ac_fn_cxx_try_compile "$LINENO"; then :
2759   ac_lo=0 ac_mid=0
2760   while :; do
2761     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762 /* end confdefs.h.  */
2763 $4
2764 int
2765 main ()
2766 {
2767 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2768 test_array [0] = 0;
2769 return test_array [0];
2770 
2771   ;
2772   return 0;
2773 }
2774 _ACEOF
2775 if ac_fn_cxx_try_compile "$LINENO"; then :
2776   ac_hi=$ac_mid; break
2777 else
2778   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2779                         if test $ac_lo -le $ac_mid; then
2780                           ac_lo= ac_hi=
2781                           break
2782                         fi
2783                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2784 fi
2785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2786   done
2787 else
2788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2789 /* end confdefs.h.  */
2790 $4
2791 int
2792 main ()
2793 {
2794 static int test_array [1 - 2 * !(($2) < 0)];
2795 test_array [0] = 0;
2796 return test_array [0];
2797 
2798   ;
2799   return 0;
2800 }
2801 _ACEOF
2802 if ac_fn_cxx_try_compile "$LINENO"; then :
2803   ac_hi=-1 ac_mid=-1
2804   while :; do
2805     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806 /* end confdefs.h.  */
2807 $4
2808 int
2809 main ()
2810 {
2811 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2812 test_array [0] = 0;
2813 return test_array [0];
2814 
2815   ;
2816   return 0;
2817 }
2818 _ACEOF
2819 if ac_fn_cxx_try_compile "$LINENO"; then :
2820   ac_lo=$ac_mid; break
2821 else
2822   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2823                         if test $ac_mid -le $ac_hi; then
2824                           ac_lo= ac_hi=
2825                           break
2826                         fi
2827                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2828 fi
2829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2830   done
2831 else
2832   ac_lo= ac_hi=
2833 fi
2834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2835 fi
2836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2837 # Binary search between lo and hi bounds.
2838 while test "x$ac_lo" != "x$ac_hi"; do
2839   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841 /* end confdefs.h.  */
2842 $4
2843 int
2844 main ()
2845 {
2846 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2847 test_array [0] = 0;
2848 return test_array [0];
2849 
2850   ;
2851   return 0;
2852 }
2853 _ACEOF
2854 if ac_fn_cxx_try_compile "$LINENO"; then :
2855   ac_hi=$ac_mid
2856 else
2857   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2858 fi
2859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2860 done
2861 case $ac_lo in #((
2862 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2863 '') ac_retval=1 ;;
2864 esac
2865   else
2866     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2867 /* end confdefs.h.  */
2868 $4
2869 static long int longval () { return $2; }
2870 static unsigned long int ulongval () { return $2; }
2871 #include <stdio.h>
2872 #include <stdlib.h>
2873 int
2874 main ()
2875 {
2876 
2877   FILE *f = fopen ("conftest.val", "w");
2878   if (! f)
2879     return 1;
2880   if (($2) < 0)
2881     {
2882       long int i = longval ();
2883       if (i != ($2))
2884         return 1;
2885       fprintf (f, "%ld", i);
2886     }
2887   else
2888     {
2889       unsigned long int i = ulongval ();
2890       if (i != ($2))
2891         return 1;
2892       fprintf (f, "%lu", i);
2893     }
2894   /* Do not output a trailing newline, as this causes \r\n confusion
2895      on some platforms.  */
2896   return ferror (f) || fclose (f) != 0;
2897 
2898   ;
2899   return 0;
2900 }
2901 _ACEOF
2902 if ac_fn_cxx_try_run "$LINENO"; then :
2903   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2904 else
2905   ac_retval=1
2906 fi
2907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2908   conftest.$ac_objext conftest.beam conftest.$ac_ext
2909 rm -f conftest.val
2910 
2911   fi
2912   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2913   as_fn_set_status $ac_retval
2914 
2915 } # ac_fn_cxx_compute_int
2916 
2917 # ac_fn_cxx_try_link LINENO
2918 # -------------------------
2919 # Try to link conftest.$ac_ext, and return whether this succeeded.
2920 ac_fn_cxx_try_link ()
2921 {
2922   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2923   rm -f conftest.$ac_objext conftest$ac_exeext
2924   if { { ac_try="$ac_link"
2925 case "(($ac_try" in
2926   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2927   *) ac_try_echo=$ac_try;;
2928 esac
2929 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2930 $as_echo "$ac_try_echo"; } >&5
2931   (eval "$ac_link") 2>conftest.err
2932   ac_status=$?
2933   if test -s conftest.err; then
2934     grep -v '^ *+' conftest.err >conftest.er1
2935     cat conftest.er1 >&5
2936     mv -f conftest.er1 conftest.err
2937   fi
2938   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2939   test $ac_status = 0; } && {
2940          test -z "$ac_cxx_werror_flag" ||
2941          test ! -s conftest.err
2942        } && test -s conftest$ac_exeext && {
2943          test "$cross_compiling" = yes ||
2944          test -x conftest$ac_exeext
2945        }; then :
2946   ac_retval=0
2947 else
2948   $as_echo "$as_me: failed program was:" >&5
2949 sed 's/^/| /' conftest.$ac_ext >&5
2950 
2951         ac_retval=1
2952 fi
2953   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2954   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2955   # interfere with the next link command; also delete a directory that is
2956   # left behind by Apple's compiler.  We do this before executing the actions.
2957   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2958   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2959   as_fn_set_status $ac_retval
2960 
2961 } # ac_fn_cxx_try_link
2962 
2963 # ac_fn_cxx_check_func LINENO FUNC VAR
2964 # ------------------------------------
2965 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2966 ac_fn_cxx_check_func ()
2967 {
2968   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2970 $as_echo_n "checking for $2... " >&6; }
2971 if eval \${$3+:} false; then :
2972   $as_echo_n "(cached) " >&6
2973 else
2974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2975 /* end confdefs.h.  */
2976 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2977    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2978 #define $2 innocuous_$2
2979 
2980 /* System header to define __stub macros and hopefully few prototypes,
2981     which can conflict with char $2 (); below.
2982     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2983     <limits.h> exists even on freestanding compilers.  */
2984 
2985 #ifdef __STDC__
2986 # include <limits.h>
2987 #else
2988 # include <assert.h>
2989 #endif
2990 
2991 #undef $2
2992 
2993 /* Override any GCC internal prototype to avoid an error.
2994    Use char because int might match the return type of a GCC
2995    builtin and then its argument prototype would still apply.  */
2996 #ifdef __cplusplus
2997 extern "C"
2998 #endif
2999 char $2 ();
3000 /* The GNU C library defines this for functions which it implements
3001     to always fail with ENOSYS.  Some functions are actually named
3002     something starting with __ and the normal name is an alias.  */
3003 #if defined __stub_$2 || defined __stub___$2
3004 choke me
3005 #endif
3006 
3007 int
3008 main ()
3009 {
3010 return $2 ();
3011   ;
3012   return 0;
3013 }
3014 _ACEOF
3015 if ac_fn_cxx_try_link "$LINENO"; then :
3016   eval "$3=yes"
3017 else
3018   eval "$3=no"
3019 fi
3020 rm -f core conftest.err conftest.$ac_objext \
3021     conftest$ac_exeext conftest.$ac_ext
3022 fi
3023 eval ac_res=\$$3
3024                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3025 $as_echo "$ac_res" >&6; }
3026   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3027 
3028 } # ac_fn_cxx_check_func
3029 
3030 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3031 # -------------------------------------------------------
3032 # Tests whether HEADER exists and can be compiled using the include files in
3033 # INCLUDES, setting the cache variable VAR accordingly.
3034 ac_fn_c_check_header_compile ()
3035 {
3036   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3037   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3038 $as_echo_n "checking for $2... " >&6; }
3039 if eval \${$3+:} false; then :
3040   $as_echo_n "(cached) " >&6
3041 else
3042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3043 /* end confdefs.h.  */
3044 $4
3045 #include <$2>
3046 _ACEOF
3047 if ac_fn_c_try_compile "$LINENO"; then :
3048   eval "$3=yes"
3049 else
3050   eval "$3=no"
3051 fi
3052 rm -f core conftest.err conftest.$ac_objext 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_c_check_header_compile
3060 cat >config.log <<_ACEOF
3061 This file contains any messages produced by compilers while
3062 running configure, to aid debugging if configure makes a mistake.
3063 
3064 It was created by OpenJDK $as_me jdk9, which was
3065 generated by GNU Autoconf 2.69.  Invocation command line was
3066 
3067   $ $0 $@
3068 
3069 _ACEOF
3070 exec 5>>config.log
3071 {
3072 cat <<_ASUNAME
3073 ## --------- ##
3074 ## Platform. ##
3075 ## --------- ##
3076 
3077 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3078 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3079 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3080 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3081 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3082 
3083 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3084 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3085 
3086 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3087 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3088 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3089 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3090 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3091 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3092 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3093 
3094 _ASUNAME
3095 
3096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3097 for as_dir in $PATH
3098 do
3099   IFS=$as_save_IFS
3100   test -z "$as_dir" && as_dir=.
3101     $as_echo "PATH: $as_dir"
3102   done
3103 IFS=$as_save_IFS
3104 
3105 } >&5
3106 
3107 cat >&5 <<_ACEOF
3108 
3109 
3110 ## ----------- ##
3111 ## Core tests. ##
3112 ## ----------- ##
3113 
3114 _ACEOF
3115 
3116 
3117 # Keep a trace of the command line.
3118 # Strip out --no-create and --no-recursion so they do not pile up.
3119 # Strip out --silent because we don't want to record it for future runs.
3120 # Also quote any args containing shell meta-characters.
3121 # Make two passes to allow for proper duplicate-argument suppression.
3122 ac_configure_args=
3123 ac_configure_args0=
3124 ac_configure_args1=
3125 ac_must_keep_next=false
3126 for ac_pass in 1 2
3127 do
3128   for ac_arg
3129   do
3130     case $ac_arg in
3131     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3132     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3133     | -silent | --silent | --silen | --sile | --sil)
3134       continue ;;
3135     *\'*)
3136       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3137     esac
3138     case $ac_pass in
3139     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3140     2)
3141       as_fn_append ac_configure_args1 " '$ac_arg'"
3142       if test $ac_must_keep_next = true; then
3143         ac_must_keep_next=false # Got value, back to normal.
3144       else
3145         case $ac_arg in
3146           *=* | --config-cache | -C | -disable-* | --disable-* \
3147           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3148           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3149           | -with-* | --with-* | -without-* | --without-* | --x)
3150             case "$ac_configure_args0 " in
3151               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3152             esac
3153             ;;
3154           -* ) ac_must_keep_next=true ;;
3155         esac
3156       fi
3157       as_fn_append ac_configure_args " '$ac_arg'"
3158       ;;
3159     esac
3160   done
3161 done
3162 { ac_configure_args0=; unset ac_configure_args0;}
3163 { ac_configure_args1=; unset ac_configure_args1;}
3164 
3165 # When interrupted or exit'd, cleanup temporary files, and complete
3166 # config.log.  We remove comments because anyway the quotes in there
3167 # would cause problems or look ugly.
3168 # WARNING: Use '\'' to represent an apostrophe within the trap.
3169 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3170 trap 'exit_status=$?
3171   # Save into config.log some information that might help in debugging.
3172   {
3173     echo
3174 
3175     $as_echo "## ---------------- ##
3176 ## Cache variables. ##
3177 ## ---------------- ##"
3178     echo
3179     # The following way of writing the cache mishandles newlines in values,
3180 (
3181   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3182     eval ac_val=\$$ac_var
3183     case $ac_val in #(
3184     *${as_nl}*)
3185       case $ac_var in #(
3186       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3187 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3188       esac
3189       case $ac_var in #(
3190       _ | IFS | as_nl) ;; #(
3191       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3192       *) { eval $ac_var=; unset $ac_var;} ;;
3193       esac ;;
3194     esac
3195   done
3196   (set) 2>&1 |
3197     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3198     *${as_nl}ac_space=\ *)
3199       sed -n \
3200         "s/'\''/'\''\\\\'\'''\''/g;
3201           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3202       ;; #(
3203     *)
3204       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3205       ;;
3206     esac |
3207     sort
3208 )
3209     echo
3210 
3211     $as_echo "## ----------------- ##
3212 ## Output variables. ##
3213 ## ----------------- ##"
3214     echo
3215     for ac_var in $ac_subst_vars
3216     do
3217       eval ac_val=\$$ac_var
3218       case $ac_val in
3219       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3220       esac
3221       $as_echo "$ac_var='\''$ac_val'\''"
3222     done | sort
3223     echo
3224 
3225     if test -n "$ac_subst_files"; then
3226       $as_echo "## ------------------- ##
3227 ## File substitutions. ##
3228 ## ------------------- ##"
3229       echo
3230       for ac_var in $ac_subst_files
3231       do
3232         eval ac_val=\$$ac_var
3233         case $ac_val in
3234         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3235         esac
3236         $as_echo "$ac_var='\''$ac_val'\''"
3237       done | sort
3238       echo
3239     fi
3240 
3241     if test -s confdefs.h; then
3242       $as_echo "## ----------- ##
3243 ## confdefs.h. ##
3244 ## ----------- ##"
3245       echo
3246       cat confdefs.h
3247       echo
3248     fi
3249     test "$ac_signal" != 0 &&
3250       $as_echo "$as_me: caught signal $ac_signal"
3251     $as_echo "$as_me: exit $exit_status"
3252   } >&5
3253   rm -f core *.core core.conftest.* &&
3254     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3255     exit $exit_status
3256 ' 0
3257 for ac_signal in 1 2 13 15; do
3258   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3259 done
3260 ac_signal=0
3261 
3262 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3263 rm -f -r conftest* confdefs.h
3264 
3265 $as_echo "/* confdefs.h */" > confdefs.h
3266 
3267 # Predefined preprocessor variables.
3268 
3269 cat >>confdefs.h <<_ACEOF
3270 #define PACKAGE_NAME "$PACKAGE_NAME"
3271 _ACEOF
3272 
3273 cat >>confdefs.h <<_ACEOF
3274 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3275 _ACEOF
3276 
3277 cat >>confdefs.h <<_ACEOF
3278 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3279 _ACEOF
3280 
3281 cat >>confdefs.h <<_ACEOF
3282 #define PACKAGE_STRING "$PACKAGE_STRING"
3283 _ACEOF
3284 
3285 cat >>confdefs.h <<_ACEOF
3286 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3287 _ACEOF
3288 
3289 cat >>confdefs.h <<_ACEOF
3290 #define PACKAGE_URL "$PACKAGE_URL"
3291 _ACEOF
3292 
3293 
3294 # Let the site file select an alternate cache file if it wants to.
3295 # Prefer an explicitly selected file to automatically selected ones.
3296 ac_site_file1=NONE
3297 ac_site_file2=NONE
3298 if test -n "$CONFIG_SITE"; then
3299   # We do not want a PATH search for config.site.
3300   case $CONFIG_SITE in #((
3301     -*)  ac_site_file1=./$CONFIG_SITE;;
3302     */*) ac_site_file1=$CONFIG_SITE;;
3303     *)   ac_site_file1=./$CONFIG_SITE;;
3304   esac
3305 elif test "x$prefix" != xNONE; then
3306   ac_site_file1=$prefix/share/config.site
3307   ac_site_file2=$prefix/etc/config.site
3308 else
3309   ac_site_file1=$ac_default_prefix/share/config.site
3310   ac_site_file2=$ac_default_prefix/etc/config.site
3311 fi
3312 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3313 do
3314   test "x$ac_site_file" = xNONE && continue
3315   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3316     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3317 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3318     sed 's/^/| /' "$ac_site_file" >&5
3319     . "$ac_site_file" \
3320       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3321 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3322 as_fn_error $? "failed to load site script $ac_site_file
3323 See \`config.log' for more details" "$LINENO" 5; }
3324   fi
3325 done
3326 
3327 if test -r "$cache_file"; then
3328   # Some versions of bash will fail to source /dev/null (special files
3329   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3330   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3331     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3332 $as_echo "$as_me: loading cache $cache_file" >&6;}
3333     case $cache_file in
3334       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3335       *)                      . "./$cache_file";;
3336     esac
3337   fi
3338 else
3339   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3340 $as_echo "$as_me: creating cache $cache_file" >&6;}
3341   >$cache_file
3342 fi
3343 
3344 # Check that the precious variables saved in the cache have kept the same
3345 # value.
3346 ac_cache_corrupted=false
3347 for ac_var in $ac_precious_vars; do
3348   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3349   eval ac_new_set=\$ac_env_${ac_var}_set
3350   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3351   eval ac_new_val=\$ac_env_${ac_var}_value
3352   case $ac_old_set,$ac_new_set in
3353     set,)
3354       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3355 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3356       ac_cache_corrupted=: ;;
3357     ,set)
3358       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3359 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3360       ac_cache_corrupted=: ;;
3361     ,);;
3362     *)
3363       if test "x$ac_old_val" != "x$ac_new_val"; then
3364         # differences in whitespace do not lead to failure.
3365         ac_old_val_w=`echo x $ac_old_val`
3366         ac_new_val_w=`echo x $ac_new_val`
3367         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3368           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3369 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3370           ac_cache_corrupted=:
3371         else
3372           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3373 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3374           eval $ac_var=\$ac_old_val
3375         fi
3376         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3377 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3378         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3379 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3380       fi;;
3381   esac
3382   # Pass precious variables to config.status.
3383   if test "$ac_new_set" = set; then
3384     case $ac_new_val in
3385     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3386     *) ac_arg=$ac_var=$ac_new_val ;;
3387     esac
3388     case " $ac_configure_args " in
3389       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3390       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3391     esac
3392   fi
3393 done
3394 if $ac_cache_corrupted; then
3395   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3396 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3397   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3398 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3399   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3400 fi
3401 ## -------------------- ##
3402 ## Main body of script. ##
3403 ## -------------------- ##
3404 
3405 ac_ext=c
3406 ac_cpp='$CPP $CPPFLAGS'
3407 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3408 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3409 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3410 
3411 
3412 
3413 ac_aux_dir=
3414 for ac_dir in $TOPDIR/make/autoconf/build-aux "$srcdir"/$TOPDIR/make/autoconf/build-aux; do
3415   if test -f "$ac_dir/install-sh"; then
3416     ac_aux_dir=$ac_dir
3417     ac_install_sh="$ac_aux_dir/install-sh -c"
3418     break
3419   elif test -f "$ac_dir/install.sh"; then
3420     ac_aux_dir=$ac_dir
3421     ac_install_sh="$ac_aux_dir/install.sh -c"
3422     break
3423   elif test -f "$ac_dir/shtool"; then
3424     ac_aux_dir=$ac_dir
3425     ac_install_sh="$ac_aux_dir/shtool install -c"
3426     break
3427   fi
3428 done
3429 if test -z "$ac_aux_dir"; then
3430   as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/make/autoconf/build-aux \"$srcdir\"/$TOPDIR/make/autoconf/build-aux" "$LINENO" 5
3431 fi
3432 
3433 # These three variables are undocumented and unsupported,
3434 # and are intended to be withdrawn in a future Autoconf release.
3435 # They can cause serious problems if a builder's source tree is in a directory
3436 # whose full name contains unusual characters.
3437 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3438 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3439 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3440 
3441 
3442 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3443 
3444 #
3445 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3446 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3447 #
3448 # This code is free software; you can redistribute it and/or modify it
3449 # under the terms of the GNU General Public License version 2 only, as
3450 # published by the Free Software Foundation.  Oracle designates this
3451 # particular file as subject to the "Classpath" exception as provided
3452 # by Oracle in the LICENSE file that accompanied this code.
3453 #
3454 # This code is distributed in the hope that it will be useful, but WITHOUT
3455 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3456 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3457 # version 2 for more details (a copy is included in the LICENSE file that
3458 # accompanied this code).
3459 #
3460 # You should have received a copy of the GNU General Public License version
3461 # 2 along with this work; if not, write to the Free Software Foundation,
3462 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3463 #
3464 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3465 # or visit www.oracle.com if you need additional information or have any
3466 # questions.
3467 #
3468 
3469 #
3470 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3471 #
3472 # This program is free software; you can redistribute it and/or modify
3473 # it under the terms of the GNU General Public License as published by
3474 # the Free Software Foundation; either version 2 of the License, or
3475 # (at your option) any later version.
3476 #
3477 # This program is distributed in the hope that it will be useful, but
3478 # WITHOUT ANY WARRANTY; without even the implied warranty of
3479 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3480 # General Public License for more details.
3481 #
3482 # You should have received a copy of the GNU General Public License
3483 # along with this program; if not, write to the Free Software
3484 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3485 #
3486 # As a special exception to the GNU General Public License, if you
3487 # distribute this file as part of a program that contains a
3488 # configuration script generated by Autoconf, you may include it under
3489 # the same distribution terms that you use for the rest of that program.
3490 
3491 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3492 # ----------------------------------
3493 # PKG_PROG_PKG_CONFIG
3494 
3495 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3496 #
3497 # Check to see whether a particular set of modules exists.  Similar
3498 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3499 #
3500 #
3501 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3502 # this or PKG_CHECK_MODULES is called, or make sure to call
3503 # PKG_CHECK_EXISTS manually
3504 # --------------------------------------------------------------
3505 
3506 
3507 
3508 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3509 # ---------------------------------------------
3510 # _PKG_CONFIG
3511 
3512 # _PKG_SHORT_ERRORS_SUPPORTED
3513 # -----------------------------
3514 # _PKG_SHORT_ERRORS_SUPPORTED
3515 
3516 
3517 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3518 # [ACTION-IF-NOT-FOUND])
3519 #
3520 #
3521 # Note that if there is a possibility the first call to
3522 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3523 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3524 #
3525 #
3526 # --------------------------------------------------------------
3527 # PKG_CHECK_MODULES
3528 
3529 
3530 # Include these first...
3531 #
3532 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3533 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3534 #
3535 # This code is free software; you can redistribute it and/or modify it
3536 # under the terms of the GNU General Public License version 2 only, as
3537 # published by the Free Software Foundation.  Oracle designates this
3538 # particular file as subject to the "Classpath" exception as provided
3539 # by Oracle in the LICENSE file that accompanied this code.
3540 #
3541 # This code is distributed in the hope that it will be useful, but WITHOUT
3542 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3543 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3544 # version 2 for more details (a copy is included in the LICENSE file that
3545 # accompanied this code).
3546 #
3547 # You should have received a copy of the GNU General Public License version
3548 # 2 along with this work; if not, write to the Free Software Foundation,
3549 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3550 #
3551 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3552 # or visit www.oracle.com if you need additional information or have any
3553 # questions.
3554 #
3555 
3556 # Create a function/macro that takes a series of named arguments. The call is
3557 # similar to AC_DEFUN, but the setup of the function looks like this:
3558 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3559 # ... do something
3560 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3561 # ])
3562 # A star (*) in front of a named argument means that it is required and it's
3563 # presence will be verified. To pass e.g. the first value as a normal indexed
3564 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3565 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3566 # "ARG_FOO".
3567 #
3568 # The generated function can be called like this:
3569 # MYFUNC(FOO: [foo-val],
3570 #     BAR: [
3571 #         $ECHO hello world
3572 #     ])
3573 # Note that the argument value must start on the same line as the argument name.
3574 #
3575 # Argument 1: Name of the function to define
3576 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3577 # Argument 3: Argument array to treat as named, typically $@
3578 # Argument 4: The main function body
3579 
3580 
3581 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3582 # If so, then append $1 to $2 \
3583 # Also set JVM_ARG_OK to true/false depending on outcome.
3584 
3585 
3586 # Appends a string to a path variable, only adding the : when needed.
3587 
3588 
3589 # Prepends a string to a path variable, only adding the : when needed.
3590 
3591 
3592 # This will make sure the given variable points to a full and proper
3593 # path. This means:
3594 # 1) There will be no spaces in the path. On unix platforms,
3595 #    spaces in the path will result in an error. On Windows,
3596 #    the path will be rewritten using short-style to be space-free.
3597 # 2) The path will be absolute, and it will be in unix-style (on
3598 #     cygwin).
3599 # $1: The name of the variable to fix
3600 
3601 
3602 # This will make sure the given variable points to a executable
3603 # with a full and proper path. This means:
3604 # 1) There will be no spaces in the path. On unix platforms,
3605 #    spaces in the path will result in an error. On Windows,
3606 #    the path will be rewritten using short-style to be space-free.
3607 # 2) The path will be absolute, and it will be in unix-style (on
3608 #     cygwin).
3609 # Any arguments given to the executable is preserved.
3610 # If the input variable does not have a directory specification, then
3611 # it need to be in the PATH.
3612 # $1: The name of the variable to fix
3613 
3614 
3615 
3616 
3617 # Register a --with argument but mark it as deprecated
3618 # $1: The name of the with argument to deprecate, not including --with-
3619 
3620 
3621 # Register a --enable argument but mark it as deprecated
3622 # $1: The name of the with argument to deprecate, not including --enable-
3623 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3624 # $3: Messages to user.
3625 
3626 
3627 
3628 
3629 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3630 # $1: variable to check
3631 
3632 
3633 # Check that there are no unprocessed overridden variables left.
3634 # If so, they are an incorrect argument and we will exit with an error.
3635 
3636 
3637 # Setup a tool for the given variable. If correctly specified by the user,
3638 # use that value, otherwise search for the tool using the supplied code snippet.
3639 # $1: variable to set
3640 # $2: code snippet to call to look for the tool
3641 # $3: code snippet to call if variable was used to find tool
3642 
3643 
3644 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3645 # $1: variable to set
3646 # $2: executable name (or list of names) to look for
3647 # $3: [path]
3648 
3649 
3650 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3651 # $1: variable to set
3652 # $2: executable name (or list of names) to look for
3653 
3654 
3655 # Like BASIC_PATH_PROGS but fails if no tool was found.
3656 # $1: variable to set
3657 # $2: executable name (or list of names) to look for
3658 # $3: [path]
3659 
3660 
3661 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3662 # $1: variable to set
3663 # $2: autoconf macro to call to look for the special tool
3664 
3665 
3666 # Setup the most fundamental tools that relies on not much else to set up,
3667 # but is used by much of the early bootstrap code.
3668 
3669 
3670 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3671 
3672 
3673 # Evaluates platform specific overrides for devkit variables.
3674 # $1: Name of variable
3675 
3676 
3677 
3678 
3679 
3680 
3681 #%%% Simple tools %%%
3682 
3683 # Check if we have found a usable version of make
3684 # $1: the path to a potential make binary (or empty)
3685 # $2: the description on how we found this
3686 
3687 
3688 
3689 
3690 # Goes looking for a usable version of GNU make.
3691 
3692 
3693 
3694 
3695 
3696 
3697 
3698 
3699 
3700 
3701 # Check if build directory is on local disk. If not possible to determine,
3702 # we prefer to claim it's local.
3703 # Argument 1: directory to test
3704 # Argument 2: what to do if it is on local disk
3705 # Argument 3: what to do otherwise (remote disk or failure)
3706 
3707 
3708 # Check that source files have basic read permissions set. This might
3709 # not be the case in cygwin in certain conditions.
3710 
3711 
3712 
3713 
3714 # Check for support for specific options in bash
3715 
3716 
3717 ################################################################################
3718 #
3719 # Default make target
3720 #
3721 
3722 
3723 # Code to run after AC_OUTPUT
3724 
3725 
3726 #
3727 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3728 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3729 #
3730 # This code is free software; you can redistribute it and/or modify it
3731 # under the terms of the GNU General Public License version 2 only, as
3732 # published by the Free Software Foundation.  Oracle designates this
3733 # particular file as subject to the "Classpath" exception as provided
3734 # by Oracle in the LICENSE file that accompanied this code.
3735 #
3736 # This code is distributed in the hope that it will be useful, but WITHOUT
3737 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3738 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3739 # version 2 for more details (a copy is included in the LICENSE file that
3740 # accompanied this code).
3741 #
3742 # You should have received a copy of the GNU General Public License version
3743 # 2 along with this work; if not, write to the Free Software Foundation,
3744 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3745 #
3746 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3747 # or visit www.oracle.com if you need additional information or have any
3748 # questions.
3749 #
3750 
3751 
3752 
3753 
3754 
3755 # Helper function which possibly converts a path using DOS-style short mode.
3756 # If so, the updated path is stored in $new_path.
3757 # $1: The path to check
3758 
3759 
3760 # Helper function which possibly converts a path using DOS-style short mode.
3761 # If so, the updated path is stored in $new_path.
3762 # $1: The path to check
3763 
3764 
3765 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3766 # and could probably be heavily simplified. However, all changes in this
3767 # area tend to need lot of testing in different scenarios, and in lack of
3768 # proper unit testing, cleaning this up has not been deemed worth the effort
3769 # at the moment.
3770 
3771 
3772 
3773 
3774 
3775 
3776 
3777 
3778 
3779 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3780 
3781 
3782 
3783 
3784 # ... then the rest
3785 #
3786 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3787 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3788 #
3789 # This code is free software; you can redistribute it and/or modify it
3790 # under the terms of the GNU General Public License version 2 only, as
3791 # published by the Free Software Foundation.  Oracle designates this
3792 # particular file as subject to the "Classpath" exception as provided
3793 # by Oracle in the LICENSE file that accompanied this code.
3794 #
3795 # This code is distributed in the hope that it will be useful, but WITHOUT
3796 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3797 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3798 # version 2 for more details (a copy is included in the LICENSE file that
3799 # accompanied this code).
3800 #
3801 # You should have received a copy of the GNU General Public License version
3802 # 2 along with this work; if not, write to the Free Software Foundation,
3803 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3804 #
3805 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3806 # or visit www.oracle.com if you need additional information or have any
3807 # questions.
3808 #
3809 
3810 ########################################################################
3811 # This file handles detection of the Boot JDK. The Boot JDK detection
3812 # process has been developed as a response to solve a complex real-world
3813 # problem. Initially, it was simple, but it has grown as platform after
3814 # platform, idiosyncracy after idiosyncracy has been supported.
3815 #
3816 # The basic idea is this:
3817 # 1) You need an acceptable *) JDK to use as a Boot JDK
3818 # 2) There are several ways to locate a JDK, that are mostly platform
3819 #    dependent **)
3820 # 3) You can have multiple JDKs installed
3821 # 4) If possible, configure should try to dig out an acceptable JDK
3822 #    automatically, without having to resort to command-line options
3823 #
3824 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3825 #     javac) and not a JRE, etc.
3826 #
3827 # **) On Windows we typically use a well-known path.
3828 #     On MacOSX we typically use the tool java_home.
3829 #     On Linux we typically find javac in the $PATH, and then follow a
3830 #     chain of symlinks that often ends up in a real JDK.
3831 #
3832 # This leads to the code where we check in different ways to locate a
3833 # JDK, and if one is found, check if it is acceptable. If not, we print
3834 # our reasons for rejecting it (useful when debugging non-working
3835 # configure situations) and continue checking the next one.
3836 ########################################################################
3837 
3838 # Execute the check given as argument, and verify the result
3839 # If the Boot JDK was previously found, do nothing
3840 # $1 A command line (typically autoconf macro) to execute
3841 
3842 
3843 # Test: Is bootjdk explicitly set by command line arguments?
3844 
3845 
3846 # Test: Is $JAVA_HOME set?
3847 
3848 
3849 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3850 
3851 
3852 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3853 # $1: Argument to the java_home binary (optional)
3854 
3855 
3856 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3857 
3858 
3859 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3860 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3861 # $1 = Path to directory containing jdk installations.
3862 # $2 = String to append to the found JDK directory to get the proper JDK home
3863 
3864 
3865 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3866 # environmental variable as base for where to look.
3867 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3868 
3869 
3870 # Test: Is there a JDK installed in default, well-known locations?
3871 
3872 
3873 # Check that a command-line tool in the Boot JDK is correct
3874 # $1 = name of variable to assign
3875 # $2 = name of binary
3876 
3877 
3878 ###############################################################################
3879 #
3880 # We need a Boot JDK to bootstrap the build.
3881 #
3882 
3883 
3884 
3885 
3886 
3887 # BUILD_JDK: the location of the latest JDK that can run
3888 #   on the host system and supports the target class file version
3889 #   generated in this JDK build.  This variable should only be
3890 #   used after the launchers are built.
3891 #
3892 
3893 # Execute the check given as argument, and verify the result.
3894 # If the JDK was previously found, do nothing.
3895 # $1 A command line (typically autoconf macro) to execute
3896 
3897 
3898 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3899 # is different than the host system doing the build (e.g. cross-compilation),
3900 # a special BUILD_JDK is built as part of the build process.  An external
3901 # prebuilt BUILD_JDK can also be supplied.
3902 
3903 
3904 #
3905 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3906 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3907 #
3908 # This code is free software; you can redistribute it and/or modify it
3909 # under the terms of the GNU General Public License version 2 only, as
3910 # published by the Free Software Foundation.  Oracle designates this
3911 # particular file as subject to the "Classpath" exception as provided
3912 # by Oracle in the LICENSE file that accompanied this code.
3913 #
3914 # This code is distributed in the hope that it will be useful, but WITHOUT
3915 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3916 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3917 # version 2 for more details (a copy is included in the LICENSE file that
3918 # accompanied this code).
3919 #
3920 # You should have received a copy of the GNU General Public License version
3921 # 2 along with this work; if not, write to the Free Software Foundation,
3922 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3923 #
3924 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3925 # or visit www.oracle.com if you need additional information or have any
3926 # questions.
3927 #
3928 
3929 
3930 
3931 
3932 
3933 
3934 
3935 
3936 
3937 
3938 
3939 
3940 
3941 
3942 
3943 
3944 
3945 ################################################################################
3946 #
3947 # Runs icecc-create-env once and prints the error if it fails
3948 #
3949 # $1: arguments to icecc-create-env
3950 # $2: log file
3951 #
3952 
3953 
3954 ################################################################################
3955 #
3956 # Optionally enable distributed compilation of native code using icecc/icecream
3957 #
3958 
3959 
3960 
3961 
3962 
3963 
3964 
3965 #
3966 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3967 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3968 #
3969 # This code is free software; you can redistribute it and/or modify it
3970 # under the terms of the GNU General Public License version 2 only, as
3971 # published by the Free Software Foundation.  Oracle designates this
3972 # particular file as subject to the "Classpath" exception as provided
3973 # by Oracle in the LICENSE file that accompanied this code.
3974 #
3975 # This code is distributed in the hope that it will be useful, but WITHOUT
3976 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3977 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3978 # version 2 for more details (a copy is included in the LICENSE file that
3979 # accompanied this code).
3980 #
3981 # You should have received a copy of the GNU General Public License version
3982 # 2 along with this work; if not, write to the Free Software Foundation,
3983 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3984 #
3985 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3986 # or visit www.oracle.com if you need additional information or have any
3987 # questions.
3988 #
3989 
3990 ################################################################################
3991 #
3992 # Setup ABI profile (for arm)
3993 #
3994 
3995 
3996 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3997 # corresponding configure arguments instead
3998 
3999 
4000 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4001 # that configure can use them while detecting compilers.
4002 # TOOLCHAIN_TYPE is available here.
4003 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4004 
4005 
4006 
4007 
4008 
4009 
4010 # Documentation on common flags used for solstudio in HIGHEST.
4011 #
4012 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4013 #          done with care, there are some assumptions below that need to
4014 #          be understood about the use of pointers, and IEEE behavior.
4015 #
4016 # -fns: Use non-standard floating point mode (not IEEE 754)
4017 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4018 # -fsingle: Use single precision floating point with 'float'
4019 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4020 #   (Source with excessing pointer casting and data access with mixed
4021 #    pointer types are not recommended)
4022 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4023 #   (If you expect perfect errno behavior, do not use this)
4024 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4025 # -xrestrict: Pointer parameters to functions do not overlap
4026 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4027 #    If you pass in multiple pointers to the same data, do not use this)
4028 # -xlibmil: Inline some library routines
4029 #   (If you expect perfect errno behavior, do not use this)
4030 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4031 #   (If you expect perfect errno behavior, do not use this)
4032 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4033 
4034     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4035     # Bug?
4036     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4037     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4038     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4039     #fi
4040 
4041 
4042 
4043 
4044 
4045 
4046 ################################################################################
4047 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4048 #      conditionals against.
4049 # $2 - Optional prefix for each variable defined.
4050 
4051 
4052 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4053 #                                  IF_FALSE: [RUN-IF-FALSE])
4054 # ------------------------------------------------------------
4055 # Check that the C compiler supports an argument
4056 
4057 
4058 
4059 
4060 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4061 #                                    IF_FALSE: [RUN-IF-FALSE])
4062 # ------------------------------------------------------------
4063 # Check that the C++ compiler supports an argument
4064 
4065 
4066 
4067 
4068 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4069 #                                IF_FALSE: [RUN-IF-FALSE])
4070 # ------------------------------------------------------------
4071 # Check that the C and C++ compilers support an argument
4072 
4073 
4074 
4075 
4076 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4077 #                                   IF_FALSE: [RUN-IF-FALSE])
4078 # ------------------------------------------------------------
4079 # Check that the linker support an argument
4080 
4081 
4082 
4083 
4084 
4085 
4086 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4087 # Arguments:
4088 # $1 - Optional prefix for each variable defined.
4089 
4090 
4091 #
4092 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4093 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4094 #
4095 # This code is free software; you can redistribute it and/or modify it
4096 # under the terms of the GNU General Public License version 2 only, as
4097 # published by the Free Software Foundation.  Oracle designates this
4098 # particular file as subject to the "Classpath" exception as provided
4099 # by Oracle in the LICENSE file that accompanied this code.
4100 #
4101 # This code is distributed in the hope that it will be useful, but WITHOUT
4102 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4103 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4104 # version 2 for more details (a copy is included in the LICENSE file that
4105 # accompanied this code).
4106 #
4107 # You should have received a copy of the GNU General Public License version
4108 # 2 along with this work; if not, write to the Free Software Foundation,
4109 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4110 #
4111 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4112 # or visit www.oracle.com if you need additional information or have any
4113 # questions.
4114 #
4115 
4116 
4117 
4118 
4119 
4120 cygwin_help() {
4121   case $1 in
4122     unzip)
4123       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4124       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4125       ;;
4126     zip)
4127       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4128       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4129       ;;
4130     make)
4131       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4132       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4133       ;;
4134     freetype)
4135       HELP_MSG="
4136 The freetype library can now be build during the configure process.
4137 Download the freetype sources and unpack them into an arbitrary directory:
4138 
4139 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4140 tar -xzf freetype-2.5.3.tar.gz
4141 
4142 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4143 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4144 builds or into '<freetype_src>/lib32' for 32-bit builds.
4145 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4146 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4147 
4148 Alternatively you can unpack the sources like this to use the default directory:
4149 
4150 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4151       ;;
4152   esac
4153 }
4154 
4155 msys_help() {
4156   PKGHANDLER_COMMAND=""
4157 }
4158 
4159 apt_help() {
4160   case $1 in
4161     reduced)
4162       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4163     devkit)
4164       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4165     openjdk)
4166       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4167     alsa)
4168       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4169     cups)
4170       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4171     freetype)
4172       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4173     ffi)
4174       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4175     x11)
4176       PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4177     ccache)
4178       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4179     dtrace)
4180       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4181   esac
4182 }
4183 
4184 yum_help() {
4185   case $1 in
4186     devkit)
4187       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4188     openjdk)
4189       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4190     alsa)
4191       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4192     cups)
4193       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4194     freetype)
4195       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4196     x11)
4197       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4198     ccache)
4199       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4200   esac
4201 }
4202 
4203 brew_help() {
4204   case $1 in
4205     openjdk)
4206       PKGHANDLER_COMMAND="brew cask install java" ;;
4207     freetype)
4208       PKGHANDLER_COMMAND="brew install freetype" ;;
4209     ccache)
4210       PKGHANDLER_COMMAND="brew install ccache" ;;
4211   esac
4212 }
4213 
4214 port_help() {
4215   PKGHANDLER_COMMAND=""
4216 }
4217 
4218 pkgutil_help() {
4219   PKGHANDLER_COMMAND=""
4220 }
4221 
4222 pkgadd_help() {
4223   PKGHANDLER_COMMAND=""
4224 }
4225 
4226 # This function will check if we're called from the "configure" wrapper while
4227 # printing --help. If so, we will print out additional information that can
4228 # only be extracted within the autoconf script, and then exit. This must be
4229 # called at the very beginning in configure.ac.
4230 
4231 
4232 
4233 
4234 
4235 
4236 #
4237 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4238 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4239 #
4240 # This code is free software; you can redistribute it and/or modify it
4241 # under the terms of the GNU General Public License version 2 only, as
4242 # published by the Free Software Foundation.  Oracle designates this
4243 # particular file as subject to the "Classpath" exception as provided
4244 # by Oracle in the LICENSE file that accompanied this code.
4245 #
4246 # This code is distributed in the hope that it will be useful, but WITHOUT
4247 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4248 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4249 # version 2 for more details (a copy is included in the LICENSE file that
4250 # accompanied this code).
4251 #
4252 # You should have received a copy of the GNU General Public License version
4253 # 2 along with this work; if not, write to the Free Software Foundation,
4254 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4255 #
4256 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4257 # or visit www.oracle.com if you need additional information or have any
4258 # questions.
4259 #
4260 
4261 # All valid JVM features, regardless of platform
4262 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4263     graal vm-structs jni-check services management all-gcs nmt cds \
4264     static-build link-time-opt aot"
4265 
4266 # All valid JVM variants
4267 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4268 
4269 ###############################################################################
4270 # Check if the specified JVM variant should be built. To be used in shell if
4271 # constructs, like this:
4272 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4273 #
4274 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4275 
4276 # Definition kept in one line to allow inlining in if statements.
4277 # Additional [] needed to keep m4 from mangling shell constructs.
4278 
4279 
4280 ###############################################################################
4281 # Check if the specified JVM features are explicitly enabled. To be used in
4282 # shell if constructs, like this:
4283 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4284 #
4285 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4286 
4287 # Definition kept in one line to allow inlining in if statements.
4288 # Additional [] needed to keep m4 from mangling shell constructs.
4289 
4290 
4291 ###############################################################################
4292 # Check which variants of the JVM that we want to build. Available variants are:
4293 #   server: normal interpreter, and a tiered C1/C2 compiler
4294 #   client: normal interpreter, and C1 (no C2 compiler)
4295 #   minimal: reduced form of client with optional features stripped out
4296 #   core: normal interpreter only, no compiler
4297 #   zero: C++ based interpreter only, no compiler
4298 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4299 #   custom: baseline JVM with no default features
4300 #
4301 
4302 
4303 ###############################################################################
4304 # Check if dtrace should be enabled and has all prerequisites present.
4305 #
4306 
4307 
4308 ################################################################################
4309 # Check if AOT should be enabled
4310 #
4311 
4312 
4313 ################################################################################
4314 # Allow to disable CDS
4315 #
4316 
4317 
4318 ###############################################################################
4319 # Set up all JVM features for each JVM variant.
4320 #
4321 
4322 
4323 ###############################################################################
4324 # Validate JVM features once all setup is complete, including custom setup.
4325 #
4326 
4327 
4328 ################################################################################
4329 #
4330 # Specify which sources will be used to build the 64-bit ARM port
4331 #
4332 # --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4333 # --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4334 #
4335 
4336 
4337 
4338 ################################################################################
4339 # Check if gtest should be built
4340 #
4341 
4342 
4343 #
4344 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4345 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4346 #
4347 # This code is free software; you can redistribute it and/or modify it
4348 # under the terms of the GNU General Public License version 2 only, as
4349 # published by the Free Software Foundation.  Oracle designates this
4350 # particular file as subject to the "Classpath" exception as provided
4351 # by Oracle in the LICENSE file that accompanied this code.
4352 #
4353 # This code is distributed in the hope that it will be useful, but WITHOUT
4354 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4355 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4356 # version 2 for more details (a copy is included in the LICENSE file that
4357 # accompanied this code).
4358 #
4359 # You should have received a copy of the GNU General Public License version
4360 # 2 along with this work; if not, write to the Free Software Foundation,
4361 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4362 #
4363 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4364 # or visit www.oracle.com if you need additional information or have any
4365 # questions.
4366 #
4367 
4368 ###############################################################################
4369 # Check which variant of the JDK that we want to build.
4370 # Currently we have:
4371 #    normal:   standard edition
4372 # but the custom make system may add other variants
4373 #
4374 # Effectively the JDK variant gives a name to a specific set of
4375 # modules to compile into the JDK.
4376 
4377 
4378 ###############################################################################
4379 # Set the debug level
4380 #    release: no debug information, all optimizations, no asserts.
4381 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4382 #    fastdebug: debug information (-g), all optimizations, all asserts
4383 #    slowdebug: debug information (-g), no optimizations, all asserts
4384 
4385 
4386 ###############################################################################
4387 #
4388 # Should we build only OpenJDK even if closed sources are present?
4389 #
4390 
4391 
4392 
4393 
4394 ###############################################################################
4395 #
4396 # Enable or disable the elliptic curve crypto implementation
4397 #
4398 
4399 
4400 
4401 
4402 ################################################################################
4403 #
4404 # Gcov coverage data for hotspot
4405 #
4406 
4407 
4408 ################################################################################
4409 #
4410 # Static build support.  When enabled will generate static
4411 # libraries instead of shared libraries for all JDK libs.
4412 #
4413 
4414 
4415 ################################################################################
4416 #
4417 # jlink options.
4418 # We always keep packaged modules in JDK image.
4419 #
4420 
4421 
4422 ################################################################################
4423 #
4424 # Check if building of the jtreg failure handler should be enabled.
4425 #
4426 
4427 
4428 ################################################################################
4429 #
4430 # Enable or disable generation of the classlist at build time
4431 #
4432 
4433 
4434 #
4435 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4436 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4437 #
4438 # This code is free software; you can redistribute it and/or modify it
4439 # under the terms of the GNU General Public License version 2 only, as
4440 # published by the Free Software Foundation.  Oracle designates this
4441 # particular file as subject to the "Classpath" exception as provided
4442 # by Oracle in the LICENSE file that accompanied this code.
4443 #
4444 # This code is distributed in the hope that it will be useful, but WITHOUT
4445 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4446 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4447 # version 2 for more details (a copy is included in the LICENSE file that
4448 # accompanied this code).
4449 #
4450 # You should have received a copy of the GNU General Public License version
4451 # 2 along with this work; if not, write to the Free Software Foundation,
4452 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4453 #
4454 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4455 # or visit www.oracle.com if you need additional information or have any
4456 # questions.
4457 #
4458 
4459 ###############################################################################
4460 #
4461 # Setup version numbers
4462 #
4463 
4464 # Verify that a given string represents a valid version number, and assign it
4465 # to a variable.
4466 
4467 # Argument 1: the variable to assign to
4468 # Argument 2: the value given by the user
4469 
4470 
4471 
4472 
4473 #
4474 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4475 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4476 #
4477 # This code is free software; you can redistribute it and/or modify it
4478 # under the terms of the GNU General Public License version 2 only, as
4479 # published by the Free Software Foundation.  Oracle designates this
4480 # particular file as subject to the "Classpath" exception as provided
4481 # by Oracle in the LICENSE file that accompanied this code.
4482 #
4483 # This code is distributed in the hope that it will be useful, but WITHOUT
4484 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4485 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4486 # version 2 for more details (a copy is included in the LICENSE file that
4487 # accompanied this code).
4488 #
4489 # You should have received a copy of the GNU General Public License version
4490 # 2 along with this work; if not, write to the Free Software Foundation,
4491 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4492 #
4493 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4494 # or visit www.oracle.com if you need additional information or have any
4495 # questions.
4496 #
4497 
4498 # Major library component reside in separate files.
4499 #
4500 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4501 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4502 #
4503 # This code is free software; you can redistribute it and/or modify it
4504 # under the terms of the GNU General Public License version 2 only, as
4505 # published by the Free Software Foundation.  Oracle designates this
4506 # particular file as subject to the "Classpath" exception as provided
4507 # by Oracle in the LICENSE file that accompanied this code.
4508 #
4509 # This code is distributed in the hope that it will be useful, but WITHOUT
4510 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4511 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4512 # version 2 for more details (a copy is included in the LICENSE file that
4513 # accompanied this code).
4514 #
4515 # You should have received a copy of the GNU General Public License version
4516 # 2 along with this work; if not, write to the Free Software Foundation,
4517 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4518 #
4519 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4520 # or visit www.oracle.com if you need additional information or have any
4521 # questions.
4522 #
4523 
4524 ################################################################################
4525 # Setup alsa (Advanced Linux Sound Architecture)
4526 ################################################################################
4527 
4528 
4529 #
4530 # Copyright (c) 2011, 2017, 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 bundled libraries.
4556 #
4557 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4558 # OpenJDK repository. Default is to use these libraries as bundled, but they
4559 # might be replaced by en external version by the user.
4560 ################################################################################
4561 
4562 
4563 ################################################################################
4564 # Setup libjpeg
4565 ################################################################################
4566 
4567 
4568 ################################################################################
4569 # Setup giflib
4570 ################################################################################
4571 
4572 
4573 ################################################################################
4574 # Setup libpng
4575 ################################################################################
4576 
4577 
4578 ################################################################################
4579 # Setup zlib
4580 ################################################################################
4581 
4582 
4583 ################################################################################
4584 # Setup lcms (Little CMS)
4585 ################################################################################
4586 
4587 
4588 #
4589 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4590 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4591 #
4592 # This code is free software; you can redistribute it and/or modify it
4593 # under the terms of the GNU General Public License version 2 only, as
4594 # published by the Free Software Foundation.  Oracle designates this
4595 # particular file as subject to the "Classpath" exception as provided
4596 # by Oracle in the LICENSE file that accompanied this code.
4597 #
4598 # This code is distributed in the hope that it will be useful, but WITHOUT
4599 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4600 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4601 # version 2 for more details (a copy is included in the LICENSE file that
4602 # accompanied this code).
4603 #
4604 # You should have received a copy of the GNU General Public License version
4605 # 2 along with this work; if not, write to the Free Software Foundation,
4606 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4607 #
4608 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4609 # or visit www.oracle.com if you need additional information or have any
4610 # questions.
4611 #
4612 
4613 ################################################################################
4614 # Setup cups (Common Unix Printing System)
4615 ################################################################################
4616 
4617 
4618 #
4619 # Copyright (c) 2015, 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 libffi (Foreign Function Interface)
4645 ################################################################################
4646 
4647 
4648 #
4649 # Copyright (c) 2011, 2017, 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 # Build the freetype lib from source
4675 ################################################################################
4676 
4677 
4678 ################################################################################
4679 # Check if a potential freeype library match is correct and usable
4680 ################################################################################
4681 
4682 
4683 ################################################################################
4684 # Setup freetype (The FreeType2 font rendering library)
4685 ################################################################################
4686 
4687 
4688 #
4689 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4690 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4691 #
4692 # This code is free software; you can redistribute it and/or modify it
4693 # under the terms of the GNU General Public License version 2 only, as
4694 # published by the Free Software Foundation.  Oracle designates this
4695 # particular file as subject to the "Classpath" exception as provided
4696 # by Oracle in the LICENSE file that accompanied this code.
4697 #
4698 # This code is distributed in the hope that it will be useful, but WITHOUT
4699 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4700 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4701 # version 2 for more details (a copy is included in the LICENSE file that
4702 # accompanied this code).
4703 #
4704 # You should have received a copy of the GNU General Public License version
4705 # 2 along with this work; if not, write to the Free Software Foundation,
4706 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4707 #
4708 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4709 # or visit www.oracle.com if you need additional information or have any
4710 # questions.
4711 #
4712 
4713 ################################################################################
4714 # Setup the standard C/C++ runtime libraries.
4715 #
4716 # Most importantly, determine if stdc++ should be linked statically or
4717 # dynamically.
4718 ################################################################################
4719 
4720 
4721 #
4722 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4723 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4724 #
4725 # This code is free software; you can redistribute it and/or modify it
4726 # under the terms of the GNU General Public License version 2 only, as
4727 # published by the Free Software Foundation.  Oracle designates this
4728 # particular file as subject to the "Classpath" exception as provided
4729 # by Oracle in the LICENSE file that accompanied this code.
4730 #
4731 # This code is distributed in the hope that it will be useful, but WITHOUT
4732 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4733 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4734 # version 2 for more details (a copy is included in the LICENSE file that
4735 # accompanied this code).
4736 #
4737 # You should have received a copy of the GNU General Public License version
4738 # 2 along with this work; if not, write to the Free Software Foundation,
4739 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4740 #
4741 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4742 # or visit www.oracle.com if you need additional information or have any
4743 # questions.
4744 #
4745 
4746 ################################################################################
4747 # Setup X11 Windows system
4748 ################################################################################
4749 
4750 
4751 
4752 ################################################################################
4753 # Determine which libraries are needed for this configuration
4754 ################################################################################
4755 
4756 
4757 ################################################################################
4758 # Parse library options, and setup needed libraries
4759 ################################################################################
4760 
4761 
4762 ################################################################################
4763 # Setup llvm (Low-Level VM)
4764 ################################################################################
4765 
4766 
4767 ################################################################################
4768 # Setup various libraries, typically small system libraries
4769 ################################################################################
4770 
4771 
4772 ################################################################################
4773 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4774 # redistribute it in the test image.
4775 ################################################################################
4776 
4777 
4778 
4779 #
4780 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4781 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4782 #
4783 # This code is free software; you can redistribute it and/or modify it
4784 # under the terms of the GNU General Public License version 2 only, as
4785 # published by the Free Software Foundation.  Oracle designates this
4786 # particular file as subject to the "Classpath" exception as provided
4787 # by Oracle in the LICENSE file that accompanied this code.
4788 #
4789 # This code is distributed in the hope that it will be useful, but WITHOUT
4790 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4791 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4792 # version 2 for more details (a copy is included in the LICENSE file that
4793 # accompanied this code).
4794 #
4795 # You should have received a copy of the GNU General Public License version
4796 # 2 along with this work; if not, write to the Free Software Foundation,
4797 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4798 #
4799 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4800 # or visit www.oracle.com if you need additional information or have any
4801 # questions.
4802 #
4803 
4804 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4805 # Converts autoconf style CPU name to OpenJDK style, into
4806 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4807 
4808 
4809 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4810 # Converts autoconf style OS name to OpenJDK style, into
4811 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4812 
4813 
4814 # Expects $host_os $host_cpu $build_os and $build_cpu
4815 # and $with_target_bits to have been setup!
4816 #
4817 # Translate the standard triplet(quadruplet) definition
4818 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4819 # OPENJDK_BUILD_OS, etc.
4820 
4821 
4822 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4823 # accordingly. Must be done after setting up build and target system, but before
4824 # doing anything else with these values.
4825 
4826 
4827 # Setup the legacy variables, for controlling the old makefiles.
4828 #
4829 
4830 
4831 # $1 - Either TARGET or BUILD to setup the variables for.
4832 
4833 
4834 
4835 
4836 
4837 
4838 #%%% Build and target systems %%%
4839 
4840 
4841 
4842 
4843 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4844 # Add -mX to various FLAGS variables.
4845 
4846 
4847 
4848 
4849 
4850 
4851 #
4852 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4853 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4854 #
4855 # This code is free software; you can redistribute it and/or modify it
4856 # under the terms of the GNU General Public License version 2 only, as
4857 # published by the Free Software Foundation.  Oracle designates this
4858 # particular file as subject to the "Classpath" exception as provided
4859 # by Oracle in the LICENSE file that accompanied this code.
4860 #
4861 # This code is distributed in the hope that it will be useful, but WITHOUT
4862 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4863 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4864 # version 2 for more details (a copy is included in the LICENSE file that
4865 # accompanied this code).
4866 #
4867 # You should have received a copy of the GNU General Public License version
4868 # 2 along with this work; if not, write to the Free Software Foundation,
4869 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4870 #
4871 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4872 # or visit www.oracle.com if you need additional information or have any
4873 # questions.
4874 #
4875 
4876 
4877 
4878 ################################################################################
4879 # Define a mechanism for importing extra prebuilt modules
4880 #
4881 
4882 
4883 
4884 #
4885 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4886 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4887 #
4888 # This code is free software; you can redistribute it and/or modify it
4889 # under the terms of the GNU General Public License version 2 only, as
4890 # published by the Free Software Foundation.  Oracle designates this
4891 # particular file as subject to the "Classpath" exception as provided
4892 # by Oracle in the LICENSE file that accompanied this code.
4893 #
4894 # This code is distributed in the hope that it will be useful, but WITHOUT
4895 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4896 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4897 # version 2 for more details (a copy is included in the LICENSE file that
4898 # accompanied this code).
4899 #
4900 # You should have received a copy of the GNU General Public License version
4901 # 2 along with this work; if not, write to the Free Software Foundation,
4902 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4903 #
4904 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4905 # or visit www.oracle.com if you need additional information or have any
4906 # questions.
4907 #
4908 
4909 ########################################################################
4910 # This file is responsible for detecting, verifying and setting up the
4911 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4912 # proper paths to the binaries, but it will not setup any flags.
4913 #
4914 # The binaries used is determined by the toolchain type, which is the family of
4915 # compilers and related tools that are used.
4916 ########################################################################
4917 
4918 
4919 # All valid toolchains, regardless of platform (used by help.m4)
4920 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4921 
4922 # These toolchains are valid on different platforms
4923 VALID_TOOLCHAINS_linux="gcc clang"
4924 VALID_TOOLCHAINS_solaris="solstudio"
4925 VALID_TOOLCHAINS_macosx="gcc clang"
4926 VALID_TOOLCHAINS_aix="xlc"
4927 VALID_TOOLCHAINS_windows="microsoft"
4928 
4929 # Toolchain descriptions
4930 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4931 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4932 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4933 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4934 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4935 
4936 # Minimum supported versions, empty means unspecified
4937 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4938 TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
4939 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4940 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4941 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4942 
4943 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4944 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4945 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4946 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4947 
4948 
4949 # Check if the configured compiler (C and C++) is of a specific version or
4950 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4951 #
4952 # Arguments:
4953 #   VERSION:   The version string to check against the found version
4954 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4955 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4956 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4957 
4958 
4959 
4960 
4961 # Setup a number of variables describing how native output files are
4962 # named on this platform/toolchain.
4963 
4964 
4965 # Determine which toolchain type to use, and make sure it is valid for this
4966 # platform. Setup various information about the selected toolchain.
4967 
4968 
4969 # Before we start detecting the toolchain executables, we might need some
4970 # special setup, e.g. additional paths etc.
4971 
4972 
4973 # Restore path, etc
4974 
4975 
4976 # Check if a compiler is of the toolchain type we expect, and save the version
4977 # information from it. If the compiler does not match the expected type,
4978 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4979 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4980 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4981 #
4982 # $1 = compiler to test (CC or CXX)
4983 # $2 = human readable name of compiler (C or C++)
4984 
4985 
4986 # Try to locate the given C or C++ compiler in the path, or otherwise.
4987 #
4988 # $1 = compiler to test (CC or CXX)
4989 # $2 = human readable name of compiler (C or C++)
4990 # $3 = compiler name to search for
4991 
4992 
4993 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4994 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4995 # archiver (AR). Verify that the compilers are correct according to the
4996 # toolchain type.
4997 
4998 
4999 # Setup additional tools that is considered a part of the toolchain, but not the
5000 # core part. Many of these are highly platform-specific and do not exist,
5001 # and/or are not needed on all platforms.
5002 
5003 
5004 # Setup the build tools (i.e, the compiler and linker used to build programs
5005 # that should be run on the build platform, not the target platform, as a build
5006 # helper). Since the non-cross-compile case uses the normal, target compilers
5007 # for this, we can only do this after these have been setup.
5008 
5009 
5010 # Do some additional checks on the detected tools.
5011 
5012 
5013 # Setup the JTReg Regression Test Harness.
5014 
5015 
5016 # Setup the JIB dependency resolver
5017 
5018 
5019 #
5020 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5021 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5022 #
5023 # This code is free software; you can redistribute it and/or modify it
5024 # under the terms of the GNU General Public License version 2 only, as
5025 # published by the Free Software Foundation.  Oracle designates this
5026 # particular file as subject to the "Classpath" exception as provided
5027 # by Oracle in the LICENSE file that accompanied this code.
5028 #
5029 # This code is distributed in the hope that it will be useful, but WITHOUT
5030 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5031 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5032 # version 2 for more details (a copy is included in the LICENSE file that
5033 # accompanied this code).
5034 #
5035 # You should have received a copy of the GNU General Public License version
5036 # 2 along with this work; if not, write to the Free Software Foundation,
5037 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5038 #
5039 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5040 # or visit www.oracle.com if you need additional information or have any
5041 # questions.
5042 #
5043 
5044 ################################################################################
5045 # The order of these defines the priority by which we try to find them.
5046 VALID_VS_VERSIONS="2013 2012 2010"
5047 
5048 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5049 VS_VERSION_INTERNAL_2010=100
5050 VS_MSVCR_2010=msvcr100.dll
5051 # We don't use msvcp on Visual Studio 2010
5052 #VS_MSVCP_2010=msvcp100.dll
5053 VS_ENVVAR_2010="VS100COMNTOOLS"
5054 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5055 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5056 VS_VS_PLATFORM_NAME_2010="v100"
5057 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5058 
5059 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5060 VS_VERSION_INTERNAL_2012=110
5061 VS_MSVCR_2012=msvcr110.dll
5062 VS_MSVCP_2012=msvcp110.dll
5063 VS_ENVVAR_2012="VS110COMNTOOLS"
5064 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5065 VS_SDK_INSTALLDIR_2012=
5066 VS_VS_PLATFORM_NAME_2012="v110"
5067 VS_SDK_PLATFORM_NAME_2012=
5068 
5069 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5070 VS_VERSION_INTERNAL_2013=120
5071 VS_MSVCR_2013=msvcr120.dll
5072 VS_MSVCP_2013=msvcp120.dll
5073 VS_ENVVAR_2013="VS120COMNTOOLS"
5074 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5075 VS_SDK_INSTALLDIR_2013=
5076 VS_VS_PLATFORM_NAME_2013="v120"
5077 VS_SDK_PLATFORM_NAME_2013=
5078 
5079 ################################################################################
5080 
5081 
5082 
5083 ################################################################################
5084 
5085 
5086 
5087 ################################################################################
5088 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5089 # build environment and assigns it to VS_ENV_CMD
5090 
5091 
5092 ################################################################################
5093 
5094 
5095 
5096 ################################################################################
5097 # Check if the VS env variables were setup prior to running configure.
5098 # If not, then find vcvarsall.bat and run it automatically, and integrate
5099 # the set env variables into the spec file.
5100 
5101 
5102 
5103 
5104 
5105 
5106 
5107 
5108 
5109 
5110 
5111 
5112 
5113 
5114 # This line needs to be here, verbatim, after all includes and the dummy hook
5115 # definitions. It is replaced with custom functionality when building
5116 # custom sources.
5117 #CUSTOM_AUTOCONF_INCLUDE
5118 
5119 # Do not change or remove the following line, it is needed for consistency checks:
5120 DATE_WHEN_GENERATED=1506397140
5121 
5122 ###############################################################################
5123 #
5124 # Initialization / Boot-strapping
5125 #
5126 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5127 # thus it jumps back and forth, each time gaining something needed later on.
5128 #
5129 ###############################################################################
5130 
5131 # If we are requested to print additional help, do that and then exit.
5132 # This must be the very first call.
5133 
5134   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5135 
5136     # Print available toolchains
5137     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5138     $PRINTF "Which are valid to use depends on the build platform.\n"
5139     for toolchain in $VALID_TOOLCHAINS_all; do
5140       # Use indirect variable referencing
5141       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5142       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5143       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5144     done
5145     $PRINTF "\n"
5146 
5147     # Print available jvm features
5148     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5149     $PRINTF "Which are valid to use depends on the target platform.\n  "
5150     $PRINTF "%s " $VALID_JVM_FEATURES
5151     $PRINTF "\n"
5152 
5153     # And now exit directly
5154     exit 0
5155   fi
5156 
5157 
5158 # Basic initialization that must happen first of all in the normal process.
5159 
5160   # Save the original command line. This is passed to us by the wrapper configure script.
5161 
5162   # Save the path variable before it gets changed
5163   ORIGINAL_PATH="$PATH"
5164 
5165   DATE_WHEN_CONFIGURED=`LANG=C date`
5166 
5167   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5168 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5169   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5170 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5171 
5172 
5173   # Start with tools that do not need have cross compilation support
5174   # and can be expected to be found in the default PATH. These tools are
5175   # used by configure.
5176 
5177   # First are all the simple required tools.
5178 
5179 
5180 
5181   # Publish this variable in the help.
5182 
5183 
5184   if [ -z "${BASENAME+x}" ]; then
5185     # The variable is not set by user, try to locate tool using the code snippet
5186     for ac_prog in basename
5187 do
5188   # Extract the first word of "$ac_prog", so it can be a program name with args.
5189 set dummy $ac_prog; ac_word=$2
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5191 $as_echo_n "checking for $ac_word... " >&6; }
5192 if ${ac_cv_path_BASENAME+:} false; then :
5193   $as_echo_n "(cached) " >&6
5194 else
5195   case $BASENAME in
5196   [\\/]* | ?:[\\/]*)
5197   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5198   ;;
5199   *)
5200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5201 for as_dir in $PATH
5202 do
5203   IFS=$as_save_IFS
5204   test -z "$as_dir" && as_dir=.
5205     for ac_exec_ext in '' $ac_executable_extensions; do
5206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5207     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5209     break 2
5210   fi
5211 done
5212   done
5213 IFS=$as_save_IFS
5214 
5215   ;;
5216 esac
5217 fi
5218 BASENAME=$ac_cv_path_BASENAME
5219 if test -n "$BASENAME"; then
5220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5221 $as_echo "$BASENAME" >&6; }
5222 else
5223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224 $as_echo "no" >&6; }
5225 fi
5226 
5227 
5228   test -n "$BASENAME" && break
5229 done
5230 
5231   else
5232     # The variable is set, but is it from the command line or the environment?
5233 
5234     # Try to remove the string !BASENAME! from our list.
5235     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5236     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5237       # If it failed, the variable was not from the command line. Ignore it,
5238       # but warn the user (except for BASH, which is always set by the calling BASH).
5239       if test "xBASENAME" != xBASH; then
5240         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5241 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5242       fi
5243       # Try to locate tool using the code snippet
5244       for ac_prog in basename
5245 do
5246   # Extract the first word of "$ac_prog", so it can be a program name with args.
5247 set dummy $ac_prog; ac_word=$2
5248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5249 $as_echo_n "checking for $ac_word... " >&6; }
5250 if ${ac_cv_path_BASENAME+:} false; then :
5251   $as_echo_n "(cached) " >&6
5252 else
5253   case $BASENAME in
5254   [\\/]* | ?:[\\/]*)
5255   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5256   ;;
5257   *)
5258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5259 for as_dir in $PATH
5260 do
5261   IFS=$as_save_IFS
5262   test -z "$as_dir" && as_dir=.
5263     for ac_exec_ext in '' $ac_executable_extensions; do
5264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5265     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5267     break 2
5268   fi
5269 done
5270   done
5271 IFS=$as_save_IFS
5272 
5273   ;;
5274 esac
5275 fi
5276 BASENAME=$ac_cv_path_BASENAME
5277 if test -n "$BASENAME"; then
5278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5279 $as_echo "$BASENAME" >&6; }
5280 else
5281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5282 $as_echo "no" >&6; }
5283 fi
5284 
5285 
5286   test -n "$BASENAME" && break
5287 done
5288 
5289     else
5290       # If it succeeded, then it was overridden by the user. We will use it
5291       # for the tool.
5292 
5293       # First remove it from the list of overridden variables, so we can test
5294       # for unknown variables in the end.
5295       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5296 
5297       # Check if we try to supply an empty value
5298       if test "x$BASENAME" = x; then
5299         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5300 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5301         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5302 $as_echo_n "checking for BASENAME... " >&6; }
5303         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5304 $as_echo "disabled" >&6; }
5305       else
5306         # Check if the provided tool contains a complete path.
5307         tool_specified="$BASENAME"
5308         tool_basename="${tool_specified##*/}"
5309         if test "x$tool_basename" = "x$tool_specified"; then
5310           # A command without a complete path is provided, search $PATH.
5311           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5312 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5313           # Extract the first word of "$tool_basename", so it can be a program name with args.
5314 set dummy $tool_basename; ac_word=$2
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5316 $as_echo_n "checking for $ac_word... " >&6; }
5317 if ${ac_cv_path_BASENAME+:} false; then :
5318   $as_echo_n "(cached) " >&6
5319 else
5320   case $BASENAME in
5321   [\\/]* | ?:[\\/]*)
5322   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5323   ;;
5324   *)
5325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5326 for as_dir in $PATH
5327 do
5328   IFS=$as_save_IFS
5329   test -z "$as_dir" && as_dir=.
5330     for ac_exec_ext in '' $ac_executable_extensions; do
5331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5332     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5334     break 2
5335   fi
5336 done
5337   done
5338 IFS=$as_save_IFS
5339 
5340   ;;
5341 esac
5342 fi
5343 BASENAME=$ac_cv_path_BASENAME
5344 if test -n "$BASENAME"; then
5345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5346 $as_echo "$BASENAME" >&6; }
5347 else
5348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5349 $as_echo "no" >&6; }
5350 fi
5351 
5352 
5353           if test "x$BASENAME" = x; then
5354             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5355           fi
5356         else
5357           # Otherwise we believe it is a complete path. Use it as it is.
5358           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5359 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5360           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5361 $as_echo_n "checking for BASENAME... " >&6; }
5362           if test ! -x "$tool_specified"; then
5363             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5364 $as_echo "not found" >&6; }
5365             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5366           fi
5367           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5368 $as_echo "$tool_specified" >&6; }
5369         fi
5370       fi
5371     fi
5372 
5373   fi
5374 
5375 
5376 
5377   if test "x$BASENAME" = x; then
5378     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5379   fi
5380 
5381 
5382 
5383 
5384 
5385   # Publish this variable in the help.
5386 
5387 
5388   if [ -z "${BASH+x}" ]; then
5389     # The variable is not set by user, try to locate tool using the code snippet
5390     for ac_prog in bash
5391 do
5392   # Extract the first word of "$ac_prog", so it can be a program name with args.
5393 set dummy $ac_prog; ac_word=$2
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5395 $as_echo_n "checking for $ac_word... " >&6; }
5396 if ${ac_cv_path_BASH+:} false; then :
5397   $as_echo_n "(cached) " >&6
5398 else
5399   case $BASH in
5400   [\\/]* | ?:[\\/]*)
5401   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5402   ;;
5403   *)
5404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405 for as_dir in $PATH
5406 do
5407   IFS=$as_save_IFS
5408   test -z "$as_dir" && as_dir=.
5409     for ac_exec_ext in '' $ac_executable_extensions; do
5410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5411     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413     break 2
5414   fi
5415 done
5416   done
5417 IFS=$as_save_IFS
5418 
5419   ;;
5420 esac
5421 fi
5422 BASH=$ac_cv_path_BASH
5423 if test -n "$BASH"; then
5424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5425 $as_echo "$BASH" >&6; }
5426 else
5427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428 $as_echo "no" >&6; }
5429 fi
5430 
5431 
5432   test -n "$BASH" && break
5433 done
5434 
5435   else
5436     # The variable is set, but is it from the command line or the environment?
5437 
5438     # Try to remove the string !BASH! from our list.
5439     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5440     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5441       # If it failed, the variable was not from the command line. Ignore it,
5442       # but warn the user (except for BASH, which is always set by the calling BASH).
5443       if test "xBASH" != xBASH; then
5444         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5445 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5446       fi
5447       # Try to locate tool using the code snippet
5448       for ac_prog in bash
5449 do
5450   # Extract the first word of "$ac_prog", so it can be a program name with args.
5451 set dummy $ac_prog; ac_word=$2
5452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453 $as_echo_n "checking for $ac_word... " >&6; }
5454 if ${ac_cv_path_BASH+:} false; then :
5455   $as_echo_n "(cached) " >&6
5456 else
5457   case $BASH in
5458   [\\/]* | ?:[\\/]*)
5459   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5460   ;;
5461   *)
5462   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463 for as_dir in $PATH
5464 do
5465   IFS=$as_save_IFS
5466   test -z "$as_dir" && as_dir=.
5467     for ac_exec_ext in '' $ac_executable_extensions; do
5468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471     break 2
5472   fi
5473 done
5474   done
5475 IFS=$as_save_IFS
5476 
5477   ;;
5478 esac
5479 fi
5480 BASH=$ac_cv_path_BASH
5481 if test -n "$BASH"; then
5482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5483 $as_echo "$BASH" >&6; }
5484 else
5485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486 $as_echo "no" >&6; }
5487 fi
5488 
5489 
5490   test -n "$BASH" && break
5491 done
5492 
5493     else
5494       # If it succeeded, then it was overridden by the user. We will use it
5495       # for the tool.
5496 
5497       # First remove it from the list of overridden variables, so we can test
5498       # for unknown variables in the end.
5499       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5500 
5501       # Check if we try to supply an empty value
5502       if test "x$BASH" = x; then
5503         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5504 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5505         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5506 $as_echo_n "checking for BASH... " >&6; }
5507         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5508 $as_echo "disabled" >&6; }
5509       else
5510         # Check if the provided tool contains a complete path.
5511         tool_specified="$BASH"
5512         tool_basename="${tool_specified##*/}"
5513         if test "x$tool_basename" = "x$tool_specified"; then
5514           # A command without a complete path is provided, search $PATH.
5515           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5516 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5517           # Extract the first word of "$tool_basename", so it can be a program name with args.
5518 set dummy $tool_basename; ac_word=$2
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5520 $as_echo_n "checking for $ac_word... " >&6; }
5521 if ${ac_cv_path_BASH+:} false; then :
5522   $as_echo_n "(cached) " >&6
5523 else
5524   case $BASH in
5525   [\\/]* | ?:[\\/]*)
5526   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5527   ;;
5528   *)
5529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5530 for as_dir in $PATH
5531 do
5532   IFS=$as_save_IFS
5533   test -z "$as_dir" && as_dir=.
5534     for ac_exec_ext in '' $ac_executable_extensions; do
5535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5536     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5538     break 2
5539   fi
5540 done
5541   done
5542 IFS=$as_save_IFS
5543 
5544   ;;
5545 esac
5546 fi
5547 BASH=$ac_cv_path_BASH
5548 if test -n "$BASH"; then
5549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5550 $as_echo "$BASH" >&6; }
5551 else
5552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5553 $as_echo "no" >&6; }
5554 fi
5555 
5556 
5557           if test "x$BASH" = x; then
5558             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5559           fi
5560         else
5561           # Otherwise we believe it is a complete path. Use it as it is.
5562           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5563 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5564           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5565 $as_echo_n "checking for BASH... " >&6; }
5566           if test ! -x "$tool_specified"; then
5567             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5568 $as_echo "not found" >&6; }
5569             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5570           fi
5571           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5572 $as_echo "$tool_specified" >&6; }
5573         fi
5574       fi
5575     fi
5576 
5577   fi
5578 
5579 
5580 
5581   if test "x$BASH" = x; then
5582     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5583   fi
5584 
5585 
5586 
5587 
5588 
5589   # Publish this variable in the help.
5590 
5591 
5592   if [ -z "${CAT+x}" ]; then
5593     # The variable is not set by user, try to locate tool using the code snippet
5594     for ac_prog in cat
5595 do
5596   # Extract the first word of "$ac_prog", so it can be a program name with args.
5597 set dummy $ac_prog; ac_word=$2
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5599 $as_echo_n "checking for $ac_word... " >&6; }
5600 if ${ac_cv_path_CAT+:} false; then :
5601   $as_echo_n "(cached) " >&6
5602 else
5603   case $CAT in
5604   [\\/]* | ?:[\\/]*)
5605   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5606   ;;
5607   *)
5608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5609 for as_dir in $PATH
5610 do
5611   IFS=$as_save_IFS
5612   test -z "$as_dir" && as_dir=.
5613     for ac_exec_ext in '' $ac_executable_extensions; do
5614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5615     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5617     break 2
5618   fi
5619 done
5620   done
5621 IFS=$as_save_IFS
5622 
5623   ;;
5624 esac
5625 fi
5626 CAT=$ac_cv_path_CAT
5627 if test -n "$CAT"; then
5628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5629 $as_echo "$CAT" >&6; }
5630 else
5631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632 $as_echo "no" >&6; }
5633 fi
5634 
5635 
5636   test -n "$CAT" && break
5637 done
5638 
5639   else
5640     # The variable is set, but is it from the command line or the environment?
5641 
5642     # Try to remove the string !CAT! from our list.
5643     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5644     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5645       # If it failed, the variable was not from the command line. Ignore it,
5646       # but warn the user (except for BASH, which is always set by the calling BASH).
5647       if test "xCAT" != xBASH; then
5648         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5649 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5650       fi
5651       # Try to locate tool using the code snippet
5652       for ac_prog in cat
5653 do
5654   # Extract the first word of "$ac_prog", so it can be a program name with args.
5655 set dummy $ac_prog; ac_word=$2
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5657 $as_echo_n "checking for $ac_word... " >&6; }
5658 if ${ac_cv_path_CAT+:} false; then :
5659   $as_echo_n "(cached) " >&6
5660 else
5661   case $CAT in
5662   [\\/]* | ?:[\\/]*)
5663   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5664   ;;
5665   *)
5666   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5667 for as_dir in $PATH
5668 do
5669   IFS=$as_save_IFS
5670   test -z "$as_dir" && as_dir=.
5671     for ac_exec_ext in '' $ac_executable_extensions; do
5672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5673     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5675     break 2
5676   fi
5677 done
5678   done
5679 IFS=$as_save_IFS
5680 
5681   ;;
5682 esac
5683 fi
5684 CAT=$ac_cv_path_CAT
5685 if test -n "$CAT"; then
5686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5687 $as_echo "$CAT" >&6; }
5688 else
5689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5690 $as_echo "no" >&6; }
5691 fi
5692 
5693 
5694   test -n "$CAT" && break
5695 done
5696 
5697     else
5698       # If it succeeded, then it was overridden by the user. We will use it
5699       # for the tool.
5700 
5701       # First remove it from the list of overridden variables, so we can test
5702       # for unknown variables in the end.
5703       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5704 
5705       # Check if we try to supply an empty value
5706       if test "x$CAT" = x; then
5707         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5708 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5709         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5710 $as_echo_n "checking for CAT... " >&6; }
5711         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5712 $as_echo "disabled" >&6; }
5713       else
5714         # Check if the provided tool contains a complete path.
5715         tool_specified="$CAT"
5716         tool_basename="${tool_specified##*/}"
5717         if test "x$tool_basename" = "x$tool_specified"; then
5718           # A command without a complete path is provided, search $PATH.
5719           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5720 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5721           # Extract the first word of "$tool_basename", so it can be a program name with args.
5722 set dummy $tool_basename; ac_word=$2
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5724 $as_echo_n "checking for $ac_word... " >&6; }
5725 if ${ac_cv_path_CAT+:} false; then :
5726   $as_echo_n "(cached) " >&6
5727 else
5728   case $CAT in
5729   [\\/]* | ?:[\\/]*)
5730   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5731   ;;
5732   *)
5733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5734 for as_dir in $PATH
5735 do
5736   IFS=$as_save_IFS
5737   test -z "$as_dir" && as_dir=.
5738     for ac_exec_ext in '' $ac_executable_extensions; do
5739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5740     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5742     break 2
5743   fi
5744 done
5745   done
5746 IFS=$as_save_IFS
5747 
5748   ;;
5749 esac
5750 fi
5751 CAT=$ac_cv_path_CAT
5752 if test -n "$CAT"; then
5753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5754 $as_echo "$CAT" >&6; }
5755 else
5756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5757 $as_echo "no" >&6; }
5758 fi
5759 
5760 
5761           if test "x$CAT" = x; then
5762             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5763           fi
5764         else
5765           # Otherwise we believe it is a complete path. Use it as it is.
5766           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5767 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5768           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5769 $as_echo_n "checking for CAT... " >&6; }
5770           if test ! -x "$tool_specified"; then
5771             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5772 $as_echo "not found" >&6; }
5773             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5774           fi
5775           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5776 $as_echo "$tool_specified" >&6; }
5777         fi
5778       fi
5779     fi
5780 
5781   fi
5782 
5783 
5784 
5785   if test "x$CAT" = x; then
5786     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5787   fi
5788 
5789 
5790 
5791 
5792 
5793   # Publish this variable in the help.
5794 
5795 
5796   if [ -z "${CHMOD+x}" ]; then
5797     # The variable is not set by user, try to locate tool using the code snippet
5798     for ac_prog in chmod
5799 do
5800   # Extract the first word of "$ac_prog", so it can be a program name with args.
5801 set dummy $ac_prog; ac_word=$2
5802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803 $as_echo_n "checking for $ac_word... " >&6; }
5804 if ${ac_cv_path_CHMOD+:} false; then :
5805   $as_echo_n "(cached) " >&6
5806 else
5807   case $CHMOD in
5808   [\\/]* | ?:[\\/]*)
5809   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5810   ;;
5811   *)
5812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813 for as_dir in $PATH
5814 do
5815   IFS=$as_save_IFS
5816   test -z "$as_dir" && as_dir=.
5817     for ac_exec_ext in '' $ac_executable_extensions; do
5818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5819     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5821     break 2
5822   fi
5823 done
5824   done
5825 IFS=$as_save_IFS
5826 
5827   ;;
5828 esac
5829 fi
5830 CHMOD=$ac_cv_path_CHMOD
5831 if test -n "$CHMOD"; then
5832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5833 $as_echo "$CHMOD" >&6; }
5834 else
5835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836 $as_echo "no" >&6; }
5837 fi
5838 
5839 
5840   test -n "$CHMOD" && break
5841 done
5842 
5843   else
5844     # The variable is set, but is it from the command line or the environment?
5845 
5846     # Try to remove the string !CHMOD! from our list.
5847     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5848     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5849       # If it failed, the variable was not from the command line. Ignore it,
5850       # but warn the user (except for BASH, which is always set by the calling BASH).
5851       if test "xCHMOD" != xBASH; then
5852         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5853 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5854       fi
5855       # Try to locate tool using the code snippet
5856       for ac_prog in chmod
5857 do
5858   # Extract the first word of "$ac_prog", so it can be a program name with args.
5859 set dummy $ac_prog; ac_word=$2
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861 $as_echo_n "checking for $ac_word... " >&6; }
5862 if ${ac_cv_path_CHMOD+:} false; then :
5863   $as_echo_n "(cached) " >&6
5864 else
5865   case $CHMOD in
5866   [\\/]* | ?:[\\/]*)
5867   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5868   ;;
5869   *)
5870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5871 for as_dir in $PATH
5872 do
5873   IFS=$as_save_IFS
5874   test -z "$as_dir" && as_dir=.
5875     for ac_exec_ext in '' $ac_executable_extensions; do
5876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5877     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5879     break 2
5880   fi
5881 done
5882   done
5883 IFS=$as_save_IFS
5884 
5885   ;;
5886 esac
5887 fi
5888 CHMOD=$ac_cv_path_CHMOD
5889 if test -n "$CHMOD"; then
5890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5891 $as_echo "$CHMOD" >&6; }
5892 else
5893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894 $as_echo "no" >&6; }
5895 fi
5896 
5897 
5898   test -n "$CHMOD" && break
5899 done
5900 
5901     else
5902       # If it succeeded, then it was overridden by the user. We will use it
5903       # for the tool.
5904 
5905       # First remove it from the list of overridden variables, so we can test
5906       # for unknown variables in the end.
5907       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5908 
5909       # Check if we try to supply an empty value
5910       if test "x$CHMOD" = x; then
5911         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5912 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5913         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5914 $as_echo_n "checking for CHMOD... " >&6; }
5915         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5916 $as_echo "disabled" >&6; }
5917       else
5918         # Check if the provided tool contains a complete path.
5919         tool_specified="$CHMOD"
5920         tool_basename="${tool_specified##*/}"
5921         if test "x$tool_basename" = "x$tool_specified"; then
5922           # A command without a complete path is provided, search $PATH.
5923           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5924 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5925           # Extract the first word of "$tool_basename", so it can be a program name with args.
5926 set dummy $tool_basename; ac_word=$2
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5928 $as_echo_n "checking for $ac_word... " >&6; }
5929 if ${ac_cv_path_CHMOD+:} false; then :
5930   $as_echo_n "(cached) " >&6
5931 else
5932   case $CHMOD in
5933   [\\/]* | ?:[\\/]*)
5934   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5935   ;;
5936   *)
5937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5938 for as_dir in $PATH
5939 do
5940   IFS=$as_save_IFS
5941   test -z "$as_dir" && as_dir=.
5942     for ac_exec_ext in '' $ac_executable_extensions; do
5943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5944     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5946     break 2
5947   fi
5948 done
5949   done
5950 IFS=$as_save_IFS
5951 
5952   ;;
5953 esac
5954 fi
5955 CHMOD=$ac_cv_path_CHMOD
5956 if test -n "$CHMOD"; then
5957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5958 $as_echo "$CHMOD" >&6; }
5959 else
5960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5961 $as_echo "no" >&6; }
5962 fi
5963 
5964 
5965           if test "x$CHMOD" = x; then
5966             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5967           fi
5968         else
5969           # Otherwise we believe it is a complete path. Use it as it is.
5970           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5971 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5972           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5973 $as_echo_n "checking for CHMOD... " >&6; }
5974           if test ! -x "$tool_specified"; then
5975             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5976 $as_echo "not found" >&6; }
5977             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5978           fi
5979           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5980 $as_echo "$tool_specified" >&6; }
5981         fi
5982       fi
5983     fi
5984 
5985   fi
5986 
5987 
5988 
5989   if test "x$CHMOD" = x; then
5990     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5991   fi
5992 
5993 
5994 
5995 
5996 
5997   # Publish this variable in the help.
5998 
5999 
6000   if [ -z "${CMP+x}" ]; then
6001     # The variable is not set by user, try to locate tool using the code snippet
6002     for ac_prog in cmp
6003 do
6004   # Extract the first word of "$ac_prog", so it can be a program name with args.
6005 set dummy $ac_prog; ac_word=$2
6006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6007 $as_echo_n "checking for $ac_word... " >&6; }
6008 if ${ac_cv_path_CMP+:} false; then :
6009   $as_echo_n "(cached) " >&6
6010 else
6011   case $CMP in
6012   [\\/]* | ?:[\\/]*)
6013   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6014   ;;
6015   *)
6016   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6017 for as_dir in $PATH
6018 do
6019   IFS=$as_save_IFS
6020   test -z "$as_dir" && as_dir=.
6021     for ac_exec_ext in '' $ac_executable_extensions; do
6022   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6023     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6024     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6025     break 2
6026   fi
6027 done
6028   done
6029 IFS=$as_save_IFS
6030 
6031   ;;
6032 esac
6033 fi
6034 CMP=$ac_cv_path_CMP
6035 if test -n "$CMP"; then
6036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6037 $as_echo "$CMP" >&6; }
6038 else
6039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040 $as_echo "no" >&6; }
6041 fi
6042 
6043 
6044   test -n "$CMP" && break
6045 done
6046 
6047   else
6048     # The variable is set, but is it from the command line or the environment?
6049 
6050     # Try to remove the string !CMP! from our list.
6051     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6052     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6053       # If it failed, the variable was not from the command line. Ignore it,
6054       # but warn the user (except for BASH, which is always set by the calling BASH).
6055       if test "xCMP" != xBASH; then
6056         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6057 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6058       fi
6059       # Try to locate tool using the code snippet
6060       for ac_prog in cmp
6061 do
6062   # Extract the first word of "$ac_prog", so it can be a program name with args.
6063 set dummy $ac_prog; ac_word=$2
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6065 $as_echo_n "checking for $ac_word... " >&6; }
6066 if ${ac_cv_path_CMP+:} false; then :
6067   $as_echo_n "(cached) " >&6
6068 else
6069   case $CMP in
6070   [\\/]* | ?:[\\/]*)
6071   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6072   ;;
6073   *)
6074   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075 for as_dir in $PATH
6076 do
6077   IFS=$as_save_IFS
6078   test -z "$as_dir" && as_dir=.
6079     for ac_exec_ext in '' $ac_executable_extensions; do
6080   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6081     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6083     break 2
6084   fi
6085 done
6086   done
6087 IFS=$as_save_IFS
6088 
6089   ;;
6090 esac
6091 fi
6092 CMP=$ac_cv_path_CMP
6093 if test -n "$CMP"; then
6094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6095 $as_echo "$CMP" >&6; }
6096 else
6097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6098 $as_echo "no" >&6; }
6099 fi
6100 
6101 
6102   test -n "$CMP" && break
6103 done
6104 
6105     else
6106       # If it succeeded, then it was overridden by the user. We will use it
6107       # for the tool.
6108 
6109       # First remove it from the list of overridden variables, so we can test
6110       # for unknown variables in the end.
6111       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6112 
6113       # Check if we try to supply an empty value
6114       if test "x$CMP" = x; then
6115         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6116 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6117         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6118 $as_echo_n "checking for CMP... " >&6; }
6119         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6120 $as_echo "disabled" >&6; }
6121       else
6122         # Check if the provided tool contains a complete path.
6123         tool_specified="$CMP"
6124         tool_basename="${tool_specified##*/}"
6125         if test "x$tool_basename" = "x$tool_specified"; then
6126           # A command without a complete path is provided, search $PATH.
6127           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6128 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6129           # Extract the first word of "$tool_basename", so it can be a program name with args.
6130 set dummy $tool_basename; ac_word=$2
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6132 $as_echo_n "checking for $ac_word... " >&6; }
6133 if ${ac_cv_path_CMP+:} false; then :
6134   $as_echo_n "(cached) " >&6
6135 else
6136   case $CMP in
6137   [\\/]* | ?:[\\/]*)
6138   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6139   ;;
6140   *)
6141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6142 for as_dir in $PATH
6143 do
6144   IFS=$as_save_IFS
6145   test -z "$as_dir" && as_dir=.
6146     for ac_exec_ext in '' $ac_executable_extensions; do
6147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6148     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6150     break 2
6151   fi
6152 done
6153   done
6154 IFS=$as_save_IFS
6155 
6156   ;;
6157 esac
6158 fi
6159 CMP=$ac_cv_path_CMP
6160 if test -n "$CMP"; then
6161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6162 $as_echo "$CMP" >&6; }
6163 else
6164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6165 $as_echo "no" >&6; }
6166 fi
6167 
6168 
6169           if test "x$CMP" = x; then
6170             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6171           fi
6172         else
6173           # Otherwise we believe it is a complete path. Use it as it is.
6174           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6175 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6176           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6177 $as_echo_n "checking for CMP... " >&6; }
6178           if test ! -x "$tool_specified"; then
6179             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6180 $as_echo "not found" >&6; }
6181             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6182           fi
6183           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6184 $as_echo "$tool_specified" >&6; }
6185         fi
6186       fi
6187     fi
6188 
6189   fi
6190 
6191 
6192 
6193   if test "x$CMP" = x; then
6194     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6195   fi
6196 
6197 
6198 
6199 
6200 
6201   # Publish this variable in the help.
6202 
6203 
6204   if [ -z "${COMM+x}" ]; then
6205     # The variable is not set by user, try to locate tool using the code snippet
6206     for ac_prog in comm
6207 do
6208   # Extract the first word of "$ac_prog", so it can be a program name with args.
6209 set dummy $ac_prog; ac_word=$2
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6211 $as_echo_n "checking for $ac_word... " >&6; }
6212 if ${ac_cv_path_COMM+:} false; then :
6213   $as_echo_n "(cached) " >&6
6214 else
6215   case $COMM in
6216   [\\/]* | ?:[\\/]*)
6217   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6218   ;;
6219   *)
6220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6221 for as_dir in $PATH
6222 do
6223   IFS=$as_save_IFS
6224   test -z "$as_dir" && as_dir=.
6225     for ac_exec_ext in '' $ac_executable_extensions; do
6226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6227     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6229     break 2
6230   fi
6231 done
6232   done
6233 IFS=$as_save_IFS
6234 
6235   ;;
6236 esac
6237 fi
6238 COMM=$ac_cv_path_COMM
6239 if test -n "$COMM"; then
6240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6241 $as_echo "$COMM" >&6; }
6242 else
6243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6244 $as_echo "no" >&6; }
6245 fi
6246 
6247 
6248   test -n "$COMM" && break
6249 done
6250 
6251   else
6252     # The variable is set, but is it from the command line or the environment?
6253 
6254     # Try to remove the string !COMM! from our list.
6255     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6256     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6257       # If it failed, the variable was not from the command line. Ignore it,
6258       # but warn the user (except for BASH, which is always set by the calling BASH).
6259       if test "xCOMM" != xBASH; then
6260         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6261 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6262       fi
6263       # Try to locate tool using the code snippet
6264       for ac_prog in comm
6265 do
6266   # Extract the first word of "$ac_prog", so it can be a program name with args.
6267 set dummy $ac_prog; ac_word=$2
6268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6269 $as_echo_n "checking for $ac_word... " >&6; }
6270 if ${ac_cv_path_COMM+:} false; then :
6271   $as_echo_n "(cached) " >&6
6272 else
6273   case $COMM in
6274   [\\/]* | ?:[\\/]*)
6275   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6276   ;;
6277   *)
6278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279 for as_dir in $PATH
6280 do
6281   IFS=$as_save_IFS
6282   test -z "$as_dir" && as_dir=.
6283     for ac_exec_ext in '' $ac_executable_extensions; do
6284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6285     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6287     break 2
6288   fi
6289 done
6290   done
6291 IFS=$as_save_IFS
6292 
6293   ;;
6294 esac
6295 fi
6296 COMM=$ac_cv_path_COMM
6297 if test -n "$COMM"; then
6298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6299 $as_echo "$COMM" >&6; }
6300 else
6301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6302 $as_echo "no" >&6; }
6303 fi
6304 
6305 
6306   test -n "$COMM" && break
6307 done
6308 
6309     else
6310       # If it succeeded, then it was overridden by the user. We will use it
6311       # for the tool.
6312 
6313       # First remove it from the list of overridden variables, so we can test
6314       # for unknown variables in the end.
6315       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6316 
6317       # Check if we try to supply an empty value
6318       if test "x$COMM" = x; then
6319         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6320 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6321         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6322 $as_echo_n "checking for COMM... " >&6; }
6323         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6324 $as_echo "disabled" >&6; }
6325       else
6326         # Check if the provided tool contains a complete path.
6327         tool_specified="$COMM"
6328         tool_basename="${tool_specified##*/}"
6329         if test "x$tool_basename" = "x$tool_specified"; then
6330           # A command without a complete path is provided, search $PATH.
6331           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6332 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6333           # Extract the first word of "$tool_basename", so it can be a program name with args.
6334 set dummy $tool_basename; ac_word=$2
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6336 $as_echo_n "checking for $ac_word... " >&6; }
6337 if ${ac_cv_path_COMM+:} false; then :
6338   $as_echo_n "(cached) " >&6
6339 else
6340   case $COMM in
6341   [\\/]* | ?:[\\/]*)
6342   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6343   ;;
6344   *)
6345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6346 for as_dir in $PATH
6347 do
6348   IFS=$as_save_IFS
6349   test -z "$as_dir" && as_dir=.
6350     for ac_exec_ext in '' $ac_executable_extensions; do
6351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6352     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6354     break 2
6355   fi
6356 done
6357   done
6358 IFS=$as_save_IFS
6359 
6360   ;;
6361 esac
6362 fi
6363 COMM=$ac_cv_path_COMM
6364 if test -n "$COMM"; then
6365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6366 $as_echo "$COMM" >&6; }
6367 else
6368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369 $as_echo "no" >&6; }
6370 fi
6371 
6372 
6373           if test "x$COMM" = x; then
6374             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6375           fi
6376         else
6377           # Otherwise we believe it is a complete path. Use it as it is.
6378           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6379 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6380           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6381 $as_echo_n "checking for COMM... " >&6; }
6382           if test ! -x "$tool_specified"; then
6383             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6384 $as_echo "not found" >&6; }
6385             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6386           fi
6387           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6388 $as_echo "$tool_specified" >&6; }
6389         fi
6390       fi
6391     fi
6392 
6393   fi
6394 
6395 
6396 
6397   if test "x$COMM" = x; then
6398     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6399   fi
6400 
6401 
6402 
6403 
6404 
6405   # Publish this variable in the help.
6406 
6407 
6408   if [ -z "${CP+x}" ]; then
6409     # The variable is not set by user, try to locate tool using the code snippet
6410     for ac_prog in cp
6411 do
6412   # Extract the first word of "$ac_prog", so it can be a program name with args.
6413 set dummy $ac_prog; ac_word=$2
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6415 $as_echo_n "checking for $ac_word... " >&6; }
6416 if ${ac_cv_path_CP+:} false; then :
6417   $as_echo_n "(cached) " >&6
6418 else
6419   case $CP in
6420   [\\/]* | ?:[\\/]*)
6421   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6422   ;;
6423   *)
6424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6425 for as_dir in $PATH
6426 do
6427   IFS=$as_save_IFS
6428   test -z "$as_dir" && as_dir=.
6429     for ac_exec_ext in '' $ac_executable_extensions; do
6430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6431     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6433     break 2
6434   fi
6435 done
6436   done
6437 IFS=$as_save_IFS
6438 
6439   ;;
6440 esac
6441 fi
6442 CP=$ac_cv_path_CP
6443 if test -n "$CP"; then
6444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6445 $as_echo "$CP" >&6; }
6446 else
6447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6448 $as_echo "no" >&6; }
6449 fi
6450 
6451 
6452   test -n "$CP" && break
6453 done
6454 
6455   else
6456     # The variable is set, but is it from the command line or the environment?
6457 
6458     # Try to remove the string !CP! from our list.
6459     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6460     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6461       # If it failed, the variable was not from the command line. Ignore it,
6462       # but warn the user (except for BASH, which is always set by the calling BASH).
6463       if test "xCP" != xBASH; then
6464         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6465 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6466       fi
6467       # Try to locate tool using the code snippet
6468       for ac_prog in cp
6469 do
6470   # Extract the first word of "$ac_prog", so it can be a program name with args.
6471 set dummy $ac_prog; ac_word=$2
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6473 $as_echo_n "checking for $ac_word... " >&6; }
6474 if ${ac_cv_path_CP+:} false; then :
6475   $as_echo_n "(cached) " >&6
6476 else
6477   case $CP in
6478   [\\/]* | ?:[\\/]*)
6479   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6480   ;;
6481   *)
6482   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6483 for as_dir in $PATH
6484 do
6485   IFS=$as_save_IFS
6486   test -z "$as_dir" && as_dir=.
6487     for ac_exec_ext in '' $ac_executable_extensions; do
6488   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6489     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6490     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6491     break 2
6492   fi
6493 done
6494   done
6495 IFS=$as_save_IFS
6496 
6497   ;;
6498 esac
6499 fi
6500 CP=$ac_cv_path_CP
6501 if test -n "$CP"; then
6502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6503 $as_echo "$CP" >&6; }
6504 else
6505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6506 $as_echo "no" >&6; }
6507 fi
6508 
6509 
6510   test -n "$CP" && break
6511 done
6512 
6513     else
6514       # If it succeeded, then it was overridden by the user. We will use it
6515       # for the tool.
6516 
6517       # First remove it from the list of overridden variables, so we can test
6518       # for unknown variables in the end.
6519       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6520 
6521       # Check if we try to supply an empty value
6522       if test "x$CP" = x; then
6523         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6524 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6525         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6526 $as_echo_n "checking for CP... " >&6; }
6527         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6528 $as_echo "disabled" >&6; }
6529       else
6530         # Check if the provided tool contains a complete path.
6531         tool_specified="$CP"
6532         tool_basename="${tool_specified##*/}"
6533         if test "x$tool_basename" = "x$tool_specified"; then
6534           # A command without a complete path is provided, search $PATH.
6535           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6536 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6537           # Extract the first word of "$tool_basename", so it can be a program name with args.
6538 set dummy $tool_basename; ac_word=$2
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6540 $as_echo_n "checking for $ac_word... " >&6; }
6541 if ${ac_cv_path_CP+:} false; then :
6542   $as_echo_n "(cached) " >&6
6543 else
6544   case $CP in
6545   [\\/]* | ?:[\\/]*)
6546   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6547   ;;
6548   *)
6549   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6550 for as_dir in $PATH
6551 do
6552   IFS=$as_save_IFS
6553   test -z "$as_dir" && as_dir=.
6554     for ac_exec_ext in '' $ac_executable_extensions; do
6555   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6556     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6558     break 2
6559   fi
6560 done
6561   done
6562 IFS=$as_save_IFS
6563 
6564   ;;
6565 esac
6566 fi
6567 CP=$ac_cv_path_CP
6568 if test -n "$CP"; then
6569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6570 $as_echo "$CP" >&6; }
6571 else
6572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6573 $as_echo "no" >&6; }
6574 fi
6575 
6576 
6577           if test "x$CP" = x; then
6578             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6579           fi
6580         else
6581           # Otherwise we believe it is a complete path. Use it as it is.
6582           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6583 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6584           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6585 $as_echo_n "checking for CP... " >&6; }
6586           if test ! -x "$tool_specified"; then
6587             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6588 $as_echo "not found" >&6; }
6589             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6590           fi
6591           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6592 $as_echo "$tool_specified" >&6; }
6593         fi
6594       fi
6595     fi
6596 
6597   fi
6598 
6599 
6600 
6601   if test "x$CP" = x; then
6602     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6603   fi
6604 
6605 
6606 
6607 
6608 
6609   # Publish this variable in the help.
6610 
6611 
6612   if [ -z "${CUT+x}" ]; then
6613     # The variable is not set by user, try to locate tool using the code snippet
6614     for ac_prog in cut
6615 do
6616   # Extract the first word of "$ac_prog", so it can be a program name with args.
6617 set dummy $ac_prog; ac_word=$2
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6619 $as_echo_n "checking for $ac_word... " >&6; }
6620 if ${ac_cv_path_CUT+:} false; then :
6621   $as_echo_n "(cached) " >&6
6622 else
6623   case $CUT in
6624   [\\/]* | ?:[\\/]*)
6625   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6626   ;;
6627   *)
6628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6629 for as_dir in $PATH
6630 do
6631   IFS=$as_save_IFS
6632   test -z "$as_dir" && as_dir=.
6633     for ac_exec_ext in '' $ac_executable_extensions; do
6634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6635     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6637     break 2
6638   fi
6639 done
6640   done
6641 IFS=$as_save_IFS
6642 
6643   ;;
6644 esac
6645 fi
6646 CUT=$ac_cv_path_CUT
6647 if test -n "$CUT"; then
6648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6649 $as_echo "$CUT" >&6; }
6650 else
6651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6652 $as_echo "no" >&6; }
6653 fi
6654 
6655 
6656   test -n "$CUT" && break
6657 done
6658 
6659   else
6660     # The variable is set, but is it from the command line or the environment?
6661 
6662     # Try to remove the string !CUT! from our list.
6663     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6664     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6665       # If it failed, the variable was not from the command line. Ignore it,
6666       # but warn the user (except for BASH, which is always set by the calling BASH).
6667       if test "xCUT" != xBASH; then
6668         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6669 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6670       fi
6671       # Try to locate tool using the code snippet
6672       for ac_prog in cut
6673 do
6674   # Extract the first word of "$ac_prog", so it can be a program name with args.
6675 set dummy $ac_prog; ac_word=$2
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6677 $as_echo_n "checking for $ac_word... " >&6; }
6678 if ${ac_cv_path_CUT+:} false; then :
6679   $as_echo_n "(cached) " >&6
6680 else
6681   case $CUT in
6682   [\\/]* | ?:[\\/]*)
6683   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6684   ;;
6685   *)
6686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6687 for as_dir in $PATH
6688 do
6689   IFS=$as_save_IFS
6690   test -z "$as_dir" && as_dir=.
6691     for ac_exec_ext in '' $ac_executable_extensions; do
6692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6693     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6695     break 2
6696   fi
6697 done
6698   done
6699 IFS=$as_save_IFS
6700 
6701   ;;
6702 esac
6703 fi
6704 CUT=$ac_cv_path_CUT
6705 if test -n "$CUT"; then
6706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6707 $as_echo "$CUT" >&6; }
6708 else
6709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6710 $as_echo "no" >&6; }
6711 fi
6712 
6713 
6714   test -n "$CUT" && break
6715 done
6716 
6717     else
6718       # If it succeeded, then it was overridden by the user. We will use it
6719       # for the tool.
6720 
6721       # First remove it from the list of overridden variables, so we can test
6722       # for unknown variables in the end.
6723       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6724 
6725       # Check if we try to supply an empty value
6726       if test "x$CUT" = x; then
6727         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6728 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6729         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6730 $as_echo_n "checking for CUT... " >&6; }
6731         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6732 $as_echo "disabled" >&6; }
6733       else
6734         # Check if the provided tool contains a complete path.
6735         tool_specified="$CUT"
6736         tool_basename="${tool_specified##*/}"
6737         if test "x$tool_basename" = "x$tool_specified"; then
6738           # A command without a complete path is provided, search $PATH.
6739           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6740 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6741           # Extract the first word of "$tool_basename", so it can be a program name with args.
6742 set dummy $tool_basename; ac_word=$2
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6744 $as_echo_n "checking for $ac_word... " >&6; }
6745 if ${ac_cv_path_CUT+:} false; then :
6746   $as_echo_n "(cached) " >&6
6747 else
6748   case $CUT in
6749   [\\/]* | ?:[\\/]*)
6750   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6751   ;;
6752   *)
6753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6754 for as_dir in $PATH
6755 do
6756   IFS=$as_save_IFS
6757   test -z "$as_dir" && as_dir=.
6758     for ac_exec_ext in '' $ac_executable_extensions; do
6759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6760     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6762     break 2
6763   fi
6764 done
6765   done
6766 IFS=$as_save_IFS
6767 
6768   ;;
6769 esac
6770 fi
6771 CUT=$ac_cv_path_CUT
6772 if test -n "$CUT"; then
6773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6774 $as_echo "$CUT" >&6; }
6775 else
6776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777 $as_echo "no" >&6; }
6778 fi
6779 
6780 
6781           if test "x$CUT" = x; then
6782             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6783           fi
6784         else
6785           # Otherwise we believe it is a complete path. Use it as it is.
6786           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6787 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6788           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6789 $as_echo_n "checking for CUT... " >&6; }
6790           if test ! -x "$tool_specified"; then
6791             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6792 $as_echo "not found" >&6; }
6793             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6794           fi
6795           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6796 $as_echo "$tool_specified" >&6; }
6797         fi
6798       fi
6799     fi
6800 
6801   fi
6802 
6803 
6804 
6805   if test "x$CUT" = x; then
6806     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6807   fi
6808 
6809 
6810 
6811 
6812 
6813   # Publish this variable in the help.
6814 
6815 
6816   if [ -z "${DATE+x}" ]; then
6817     # The variable is not set by user, try to locate tool using the code snippet
6818     for ac_prog in date
6819 do
6820   # Extract the first word of "$ac_prog", so it can be a program name with args.
6821 set dummy $ac_prog; ac_word=$2
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6823 $as_echo_n "checking for $ac_word... " >&6; }
6824 if ${ac_cv_path_DATE+:} false; then :
6825   $as_echo_n "(cached) " >&6
6826 else
6827   case $DATE in
6828   [\\/]* | ?:[\\/]*)
6829   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6830   ;;
6831   *)
6832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6833 for as_dir in $PATH
6834 do
6835   IFS=$as_save_IFS
6836   test -z "$as_dir" && as_dir=.
6837     for ac_exec_ext in '' $ac_executable_extensions; do
6838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6839     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6841     break 2
6842   fi
6843 done
6844   done
6845 IFS=$as_save_IFS
6846 
6847   ;;
6848 esac
6849 fi
6850 DATE=$ac_cv_path_DATE
6851 if test -n "$DATE"; then
6852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6853 $as_echo "$DATE" >&6; }
6854 else
6855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6856 $as_echo "no" >&6; }
6857 fi
6858 
6859 
6860   test -n "$DATE" && break
6861 done
6862 
6863   else
6864     # The variable is set, but is it from the command line or the environment?
6865 
6866     # Try to remove the string !DATE! from our list.
6867     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6868     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6869       # If it failed, the variable was not from the command line. Ignore it,
6870       # but warn the user (except for BASH, which is always set by the calling BASH).
6871       if test "xDATE" != xBASH; then
6872         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6873 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6874       fi
6875       # Try to locate tool using the code snippet
6876       for ac_prog in date
6877 do
6878   # Extract the first word of "$ac_prog", so it can be a program name with args.
6879 set dummy $ac_prog; ac_word=$2
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6881 $as_echo_n "checking for $ac_word... " >&6; }
6882 if ${ac_cv_path_DATE+:} false; then :
6883   $as_echo_n "(cached) " >&6
6884 else
6885   case $DATE in
6886   [\\/]* | ?:[\\/]*)
6887   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6888   ;;
6889   *)
6890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6891 for as_dir in $PATH
6892 do
6893   IFS=$as_save_IFS
6894   test -z "$as_dir" && as_dir=.
6895     for ac_exec_ext in '' $ac_executable_extensions; do
6896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6897     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6899     break 2
6900   fi
6901 done
6902   done
6903 IFS=$as_save_IFS
6904 
6905   ;;
6906 esac
6907 fi
6908 DATE=$ac_cv_path_DATE
6909 if test -n "$DATE"; then
6910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6911 $as_echo "$DATE" >&6; }
6912 else
6913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6914 $as_echo "no" >&6; }
6915 fi
6916 
6917 
6918   test -n "$DATE" && break
6919 done
6920 
6921     else
6922       # If it succeeded, then it was overridden by the user. We will use it
6923       # for the tool.
6924 
6925       # First remove it from the list of overridden variables, so we can test
6926       # for unknown variables in the end.
6927       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6928 
6929       # Check if we try to supply an empty value
6930       if test "x$DATE" = x; then
6931         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6932 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6933         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6934 $as_echo_n "checking for DATE... " >&6; }
6935         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6936 $as_echo "disabled" >&6; }
6937       else
6938         # Check if the provided tool contains a complete path.
6939         tool_specified="$DATE"
6940         tool_basename="${tool_specified##*/}"
6941         if test "x$tool_basename" = "x$tool_specified"; then
6942           # A command without a complete path is provided, search $PATH.
6943           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6944 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6945           # Extract the first word of "$tool_basename", so it can be a program name with args.
6946 set dummy $tool_basename; ac_word=$2
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6948 $as_echo_n "checking for $ac_word... " >&6; }
6949 if ${ac_cv_path_DATE+:} false; then :
6950   $as_echo_n "(cached) " >&6
6951 else
6952   case $DATE in
6953   [\\/]* | ?:[\\/]*)
6954   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6955   ;;
6956   *)
6957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6958 for as_dir in $PATH
6959 do
6960   IFS=$as_save_IFS
6961   test -z "$as_dir" && as_dir=.
6962     for ac_exec_ext in '' $ac_executable_extensions; do
6963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6964     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6966     break 2
6967   fi
6968 done
6969   done
6970 IFS=$as_save_IFS
6971 
6972   ;;
6973 esac
6974 fi
6975 DATE=$ac_cv_path_DATE
6976 if test -n "$DATE"; then
6977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6978 $as_echo "$DATE" >&6; }
6979 else
6980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6981 $as_echo "no" >&6; }
6982 fi
6983 
6984 
6985           if test "x$DATE" = x; then
6986             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6987           fi
6988         else
6989           # Otherwise we believe it is a complete path. Use it as it is.
6990           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6991 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6992           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6993 $as_echo_n "checking for DATE... " >&6; }
6994           if test ! -x "$tool_specified"; then
6995             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6996 $as_echo "not found" >&6; }
6997             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6998           fi
6999           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7000 $as_echo "$tool_specified" >&6; }
7001         fi
7002       fi
7003     fi
7004 
7005   fi
7006 
7007 
7008 
7009   if test "x$DATE" = x; then
7010     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7011   fi
7012 
7013 
7014 
7015 
7016 
7017   # Publish this variable in the help.
7018 
7019 
7020   if [ -z "${DIFF+x}" ]; then
7021     # The variable is not set by user, try to locate tool using the code snippet
7022     for ac_prog in gdiff diff
7023 do
7024   # Extract the first word of "$ac_prog", so it can be a program name with args.
7025 set dummy $ac_prog; ac_word=$2
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7027 $as_echo_n "checking for $ac_word... " >&6; }
7028 if ${ac_cv_path_DIFF+:} false; then :
7029   $as_echo_n "(cached) " >&6
7030 else
7031   case $DIFF in
7032   [\\/]* | ?:[\\/]*)
7033   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7034   ;;
7035   *)
7036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7037 for as_dir in $PATH
7038 do
7039   IFS=$as_save_IFS
7040   test -z "$as_dir" && as_dir=.
7041     for ac_exec_ext in '' $ac_executable_extensions; do
7042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7043     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7045     break 2
7046   fi
7047 done
7048   done
7049 IFS=$as_save_IFS
7050 
7051   ;;
7052 esac
7053 fi
7054 DIFF=$ac_cv_path_DIFF
7055 if test -n "$DIFF"; then
7056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7057 $as_echo "$DIFF" >&6; }
7058 else
7059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060 $as_echo "no" >&6; }
7061 fi
7062 
7063 
7064   test -n "$DIFF" && break
7065 done
7066 
7067   else
7068     # The variable is set, but is it from the command line or the environment?
7069 
7070     # Try to remove the string !DIFF! from our list.
7071     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7072     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7073       # If it failed, the variable was not from the command line. Ignore it,
7074       # but warn the user (except for BASH, which is always set by the calling BASH).
7075       if test "xDIFF" != xBASH; then
7076         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7077 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7078       fi
7079       # Try to locate tool using the code snippet
7080       for ac_prog in gdiff diff
7081 do
7082   # Extract the first word of "$ac_prog", so it can be a program name with args.
7083 set dummy $ac_prog; ac_word=$2
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7085 $as_echo_n "checking for $ac_word... " >&6; }
7086 if ${ac_cv_path_DIFF+:} false; then :
7087   $as_echo_n "(cached) " >&6
7088 else
7089   case $DIFF in
7090   [\\/]* | ?:[\\/]*)
7091   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7092   ;;
7093   *)
7094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7095 for as_dir in $PATH
7096 do
7097   IFS=$as_save_IFS
7098   test -z "$as_dir" && as_dir=.
7099     for ac_exec_ext in '' $ac_executable_extensions; do
7100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7101     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7103     break 2
7104   fi
7105 done
7106   done
7107 IFS=$as_save_IFS
7108 
7109   ;;
7110 esac
7111 fi
7112 DIFF=$ac_cv_path_DIFF
7113 if test -n "$DIFF"; then
7114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7115 $as_echo "$DIFF" >&6; }
7116 else
7117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7118 $as_echo "no" >&6; }
7119 fi
7120 
7121 
7122   test -n "$DIFF" && break
7123 done
7124 
7125     else
7126       # If it succeeded, then it was overridden by the user. We will use it
7127       # for the tool.
7128 
7129       # First remove it from the list of overridden variables, so we can test
7130       # for unknown variables in the end.
7131       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7132 
7133       # Check if we try to supply an empty value
7134       if test "x$DIFF" = x; then
7135         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7136 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7137         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7138 $as_echo_n "checking for DIFF... " >&6; }
7139         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7140 $as_echo "disabled" >&6; }
7141       else
7142         # Check if the provided tool contains a complete path.
7143         tool_specified="$DIFF"
7144         tool_basename="${tool_specified##*/}"
7145         if test "x$tool_basename" = "x$tool_specified"; then
7146           # A command without a complete path is provided, search $PATH.
7147           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7148 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7149           # Extract the first word of "$tool_basename", so it can be a program name with args.
7150 set dummy $tool_basename; ac_word=$2
7151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7152 $as_echo_n "checking for $ac_word... " >&6; }
7153 if ${ac_cv_path_DIFF+:} false; then :
7154   $as_echo_n "(cached) " >&6
7155 else
7156   case $DIFF in
7157   [\\/]* | ?:[\\/]*)
7158   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7159   ;;
7160   *)
7161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7162 for as_dir in $PATH
7163 do
7164   IFS=$as_save_IFS
7165   test -z "$as_dir" && as_dir=.
7166     for ac_exec_ext in '' $ac_executable_extensions; do
7167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7168     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7170     break 2
7171   fi
7172 done
7173   done
7174 IFS=$as_save_IFS
7175 
7176   ;;
7177 esac
7178 fi
7179 DIFF=$ac_cv_path_DIFF
7180 if test -n "$DIFF"; then
7181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7182 $as_echo "$DIFF" >&6; }
7183 else
7184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7185 $as_echo "no" >&6; }
7186 fi
7187 
7188 
7189           if test "x$DIFF" = x; then
7190             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7191           fi
7192         else
7193           # Otherwise we believe it is a complete path. Use it as it is.
7194           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7195 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7196           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7197 $as_echo_n "checking for DIFF... " >&6; }
7198           if test ! -x "$tool_specified"; then
7199             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7200 $as_echo "not found" >&6; }
7201             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7202           fi
7203           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7204 $as_echo "$tool_specified" >&6; }
7205         fi
7206       fi
7207     fi
7208 
7209   fi
7210 
7211 
7212 
7213   if test "x$DIFF" = x; then
7214     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7215   fi
7216 
7217 
7218 
7219 
7220 
7221   # Publish this variable in the help.
7222 
7223 
7224   if [ -z "${DIRNAME+x}" ]; then
7225     # The variable is not set by user, try to locate tool using the code snippet
7226     for ac_prog in dirname
7227 do
7228   # Extract the first word of "$ac_prog", so it can be a program name with args.
7229 set dummy $ac_prog; ac_word=$2
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7231 $as_echo_n "checking for $ac_word... " >&6; }
7232 if ${ac_cv_path_DIRNAME+:} false; then :
7233   $as_echo_n "(cached) " >&6
7234 else
7235   case $DIRNAME in
7236   [\\/]* | ?:[\\/]*)
7237   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7238   ;;
7239   *)
7240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7241 for as_dir in $PATH
7242 do
7243   IFS=$as_save_IFS
7244   test -z "$as_dir" && as_dir=.
7245     for ac_exec_ext in '' $ac_executable_extensions; do
7246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7247     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7249     break 2
7250   fi
7251 done
7252   done
7253 IFS=$as_save_IFS
7254 
7255   ;;
7256 esac
7257 fi
7258 DIRNAME=$ac_cv_path_DIRNAME
7259 if test -n "$DIRNAME"; then
7260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7261 $as_echo "$DIRNAME" >&6; }
7262 else
7263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7264 $as_echo "no" >&6; }
7265 fi
7266 
7267 
7268   test -n "$DIRNAME" && break
7269 done
7270 
7271   else
7272     # The variable is set, but is it from the command line or the environment?
7273 
7274     # Try to remove the string !DIRNAME! from our list.
7275     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7276     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7277       # If it failed, the variable was not from the command line. Ignore it,
7278       # but warn the user (except for BASH, which is always set by the calling BASH).
7279       if test "xDIRNAME" != xBASH; then
7280         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7281 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7282       fi
7283       # Try to locate tool using the code snippet
7284       for ac_prog in dirname
7285 do
7286   # Extract the first word of "$ac_prog", so it can be a program name with args.
7287 set dummy $ac_prog; ac_word=$2
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7289 $as_echo_n "checking for $ac_word... " >&6; }
7290 if ${ac_cv_path_DIRNAME+:} false; then :
7291   $as_echo_n "(cached) " >&6
7292 else
7293   case $DIRNAME in
7294   [\\/]* | ?:[\\/]*)
7295   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7296   ;;
7297   *)
7298   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7299 for as_dir in $PATH
7300 do
7301   IFS=$as_save_IFS
7302   test -z "$as_dir" && as_dir=.
7303     for ac_exec_ext in '' $ac_executable_extensions; do
7304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7305     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7307     break 2
7308   fi
7309 done
7310   done
7311 IFS=$as_save_IFS
7312 
7313   ;;
7314 esac
7315 fi
7316 DIRNAME=$ac_cv_path_DIRNAME
7317 if test -n "$DIRNAME"; then
7318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7319 $as_echo "$DIRNAME" >&6; }
7320 else
7321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7322 $as_echo "no" >&6; }
7323 fi
7324 
7325 
7326   test -n "$DIRNAME" && break
7327 done
7328 
7329     else
7330       # If it succeeded, then it was overridden by the user. We will use it
7331       # for the tool.
7332 
7333       # First remove it from the list of overridden variables, so we can test
7334       # for unknown variables in the end.
7335       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7336 
7337       # Check if we try to supply an empty value
7338       if test "x$DIRNAME" = x; then
7339         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7340 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7341         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7342 $as_echo_n "checking for DIRNAME... " >&6; }
7343         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7344 $as_echo "disabled" >&6; }
7345       else
7346         # Check if the provided tool contains a complete path.
7347         tool_specified="$DIRNAME"
7348         tool_basename="${tool_specified##*/}"
7349         if test "x$tool_basename" = "x$tool_specified"; then
7350           # A command without a complete path is provided, search $PATH.
7351           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7352 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7353           # Extract the first word of "$tool_basename", so it can be a program name with args.
7354 set dummy $tool_basename; ac_word=$2
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7356 $as_echo_n "checking for $ac_word... " >&6; }
7357 if ${ac_cv_path_DIRNAME+:} false; then :
7358   $as_echo_n "(cached) " >&6
7359 else
7360   case $DIRNAME in
7361   [\\/]* | ?:[\\/]*)
7362   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7363   ;;
7364   *)
7365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7366 for as_dir in $PATH
7367 do
7368   IFS=$as_save_IFS
7369   test -z "$as_dir" && as_dir=.
7370     for ac_exec_ext in '' $ac_executable_extensions; do
7371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7372     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7374     break 2
7375   fi
7376 done
7377   done
7378 IFS=$as_save_IFS
7379 
7380   ;;
7381 esac
7382 fi
7383 DIRNAME=$ac_cv_path_DIRNAME
7384 if test -n "$DIRNAME"; then
7385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7386 $as_echo "$DIRNAME" >&6; }
7387 else
7388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7389 $as_echo "no" >&6; }
7390 fi
7391 
7392 
7393           if test "x$DIRNAME" = x; then
7394             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7395           fi
7396         else
7397           # Otherwise we believe it is a complete path. Use it as it is.
7398           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7399 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7400           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7401 $as_echo_n "checking for DIRNAME... " >&6; }
7402           if test ! -x "$tool_specified"; then
7403             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7404 $as_echo "not found" >&6; }
7405             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7406           fi
7407           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7408 $as_echo "$tool_specified" >&6; }
7409         fi
7410       fi
7411     fi
7412 
7413   fi
7414 
7415 
7416 
7417   if test "x$DIRNAME" = x; then
7418     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7419   fi
7420 
7421 
7422 
7423 
7424 
7425   # Publish this variable in the help.
7426 
7427 
7428   if [ -z "${ECHO+x}" ]; then
7429     # The variable is not set by user, try to locate tool using the code snippet
7430     for ac_prog in echo
7431 do
7432   # Extract the first word of "$ac_prog", so it can be a program name with args.
7433 set dummy $ac_prog; ac_word=$2
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7435 $as_echo_n "checking for $ac_word... " >&6; }
7436 if ${ac_cv_path_ECHO+:} false; then :
7437   $as_echo_n "(cached) " >&6
7438 else
7439   case $ECHO in
7440   [\\/]* | ?:[\\/]*)
7441   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7442   ;;
7443   *)
7444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7445 for as_dir in $PATH
7446 do
7447   IFS=$as_save_IFS
7448   test -z "$as_dir" && as_dir=.
7449     for ac_exec_ext in '' $ac_executable_extensions; do
7450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7451     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7453     break 2
7454   fi
7455 done
7456   done
7457 IFS=$as_save_IFS
7458 
7459   ;;
7460 esac
7461 fi
7462 ECHO=$ac_cv_path_ECHO
7463 if test -n "$ECHO"; then
7464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7465 $as_echo "$ECHO" >&6; }
7466 else
7467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468 $as_echo "no" >&6; }
7469 fi
7470 
7471 
7472   test -n "$ECHO" && break
7473 done
7474 
7475   else
7476     # The variable is set, but is it from the command line or the environment?
7477 
7478     # Try to remove the string !ECHO! from our list.
7479     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7480     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7481       # If it failed, the variable was not from the command line. Ignore it,
7482       # but warn the user (except for BASH, which is always set by the calling BASH).
7483       if test "xECHO" != xBASH; then
7484         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7485 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7486       fi
7487       # Try to locate tool using the code snippet
7488       for ac_prog in echo
7489 do
7490   # Extract the first word of "$ac_prog", so it can be a program name with args.
7491 set dummy $ac_prog; ac_word=$2
7492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7493 $as_echo_n "checking for $ac_word... " >&6; }
7494 if ${ac_cv_path_ECHO+:} false; then :
7495   $as_echo_n "(cached) " >&6
7496 else
7497   case $ECHO in
7498   [\\/]* | ?:[\\/]*)
7499   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7500   ;;
7501   *)
7502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7503 for as_dir in $PATH
7504 do
7505   IFS=$as_save_IFS
7506   test -z "$as_dir" && as_dir=.
7507     for ac_exec_ext in '' $ac_executable_extensions; do
7508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7509     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7511     break 2
7512   fi
7513 done
7514   done
7515 IFS=$as_save_IFS
7516 
7517   ;;
7518 esac
7519 fi
7520 ECHO=$ac_cv_path_ECHO
7521 if test -n "$ECHO"; then
7522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7523 $as_echo "$ECHO" >&6; }
7524 else
7525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526 $as_echo "no" >&6; }
7527 fi
7528 
7529 
7530   test -n "$ECHO" && break
7531 done
7532 
7533     else
7534       # If it succeeded, then it was overridden by the user. We will use it
7535       # for the tool.
7536 
7537       # First remove it from the list of overridden variables, so we can test
7538       # for unknown variables in the end.
7539       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7540 
7541       # Check if we try to supply an empty value
7542       if test "x$ECHO" = x; then
7543         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7544 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7545         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7546 $as_echo_n "checking for ECHO... " >&6; }
7547         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7548 $as_echo "disabled" >&6; }
7549       else
7550         # Check if the provided tool contains a complete path.
7551         tool_specified="$ECHO"
7552         tool_basename="${tool_specified##*/}"
7553         if test "x$tool_basename" = "x$tool_specified"; then
7554           # A command without a complete path is provided, search $PATH.
7555           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7556 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7557           # Extract the first word of "$tool_basename", so it can be a program name with args.
7558 set dummy $tool_basename; ac_word=$2
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7560 $as_echo_n "checking for $ac_word... " >&6; }
7561 if ${ac_cv_path_ECHO+:} false; then :
7562   $as_echo_n "(cached) " >&6
7563 else
7564   case $ECHO in
7565   [\\/]* | ?:[\\/]*)
7566   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7567   ;;
7568   *)
7569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7570 for as_dir in $PATH
7571 do
7572   IFS=$as_save_IFS
7573   test -z "$as_dir" && as_dir=.
7574     for ac_exec_ext in '' $ac_executable_extensions; do
7575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7576     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7578     break 2
7579   fi
7580 done
7581   done
7582 IFS=$as_save_IFS
7583 
7584   ;;
7585 esac
7586 fi
7587 ECHO=$ac_cv_path_ECHO
7588 if test -n "$ECHO"; then
7589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7590 $as_echo "$ECHO" >&6; }
7591 else
7592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7593 $as_echo "no" >&6; }
7594 fi
7595 
7596 
7597           if test "x$ECHO" = x; then
7598             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7599           fi
7600         else
7601           # Otherwise we believe it is a complete path. Use it as it is.
7602           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7603 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7604           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7605 $as_echo_n "checking for ECHO... " >&6; }
7606           if test ! -x "$tool_specified"; then
7607             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7608 $as_echo "not found" >&6; }
7609             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7610           fi
7611           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7612 $as_echo "$tool_specified" >&6; }
7613         fi
7614       fi
7615     fi
7616 
7617   fi
7618 
7619 
7620 
7621   if test "x$ECHO" = x; then
7622     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7623   fi
7624 
7625 
7626 
7627 
7628 
7629   # Publish this variable in the help.
7630 
7631 
7632   if [ -z "${EXPR+x}" ]; then
7633     # The variable is not set by user, try to locate tool using the code snippet
7634     for ac_prog in expr
7635 do
7636   # Extract the first word of "$ac_prog", so it can be a program name with args.
7637 set dummy $ac_prog; ac_word=$2
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7639 $as_echo_n "checking for $ac_word... " >&6; }
7640 if ${ac_cv_path_EXPR+:} false; then :
7641   $as_echo_n "(cached) " >&6
7642 else
7643   case $EXPR in
7644   [\\/]* | ?:[\\/]*)
7645   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7646   ;;
7647   *)
7648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7649 for as_dir in $PATH
7650 do
7651   IFS=$as_save_IFS
7652   test -z "$as_dir" && as_dir=.
7653     for ac_exec_ext in '' $ac_executable_extensions; do
7654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7655     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7657     break 2
7658   fi
7659 done
7660   done
7661 IFS=$as_save_IFS
7662 
7663   ;;
7664 esac
7665 fi
7666 EXPR=$ac_cv_path_EXPR
7667 if test -n "$EXPR"; then
7668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7669 $as_echo "$EXPR" >&6; }
7670 else
7671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7672 $as_echo "no" >&6; }
7673 fi
7674 
7675 
7676   test -n "$EXPR" && break
7677 done
7678 
7679   else
7680     # The variable is set, but is it from the command line or the environment?
7681 
7682     # Try to remove the string !EXPR! from our list.
7683     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7684     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7685       # If it failed, the variable was not from the command line. Ignore it,
7686       # but warn the user (except for BASH, which is always set by the calling BASH).
7687       if test "xEXPR" != xBASH; then
7688         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7689 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7690       fi
7691       # Try to locate tool using the code snippet
7692       for ac_prog in expr
7693 do
7694   # Extract the first word of "$ac_prog", so it can be a program name with args.
7695 set dummy $ac_prog; ac_word=$2
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7697 $as_echo_n "checking for $ac_word... " >&6; }
7698 if ${ac_cv_path_EXPR+:} false; then :
7699   $as_echo_n "(cached) " >&6
7700 else
7701   case $EXPR in
7702   [\\/]* | ?:[\\/]*)
7703   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7704   ;;
7705   *)
7706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7707 for as_dir in $PATH
7708 do
7709   IFS=$as_save_IFS
7710   test -z "$as_dir" && as_dir=.
7711     for ac_exec_ext in '' $ac_executable_extensions; do
7712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7713     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7715     break 2
7716   fi
7717 done
7718   done
7719 IFS=$as_save_IFS
7720 
7721   ;;
7722 esac
7723 fi
7724 EXPR=$ac_cv_path_EXPR
7725 if test -n "$EXPR"; then
7726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7727 $as_echo "$EXPR" >&6; }
7728 else
7729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7730 $as_echo "no" >&6; }
7731 fi
7732 
7733 
7734   test -n "$EXPR" && break
7735 done
7736 
7737     else
7738       # If it succeeded, then it was overridden by the user. We will use it
7739       # for the tool.
7740 
7741       # First remove it from the list of overridden variables, so we can test
7742       # for unknown variables in the end.
7743       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7744 
7745       # Check if we try to supply an empty value
7746       if test "x$EXPR" = x; then
7747         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7748 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7749         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7750 $as_echo_n "checking for EXPR... " >&6; }
7751         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7752 $as_echo "disabled" >&6; }
7753       else
7754         # Check if the provided tool contains a complete path.
7755         tool_specified="$EXPR"
7756         tool_basename="${tool_specified##*/}"
7757         if test "x$tool_basename" = "x$tool_specified"; then
7758           # A command without a complete path is provided, search $PATH.
7759           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7760 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7761           # Extract the first word of "$tool_basename", so it can be a program name with args.
7762 set dummy $tool_basename; ac_word=$2
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7764 $as_echo_n "checking for $ac_word... " >&6; }
7765 if ${ac_cv_path_EXPR+:} false; then :
7766   $as_echo_n "(cached) " >&6
7767 else
7768   case $EXPR in
7769   [\\/]* | ?:[\\/]*)
7770   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7771   ;;
7772   *)
7773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7774 for as_dir in $PATH
7775 do
7776   IFS=$as_save_IFS
7777   test -z "$as_dir" && as_dir=.
7778     for ac_exec_ext in '' $ac_executable_extensions; do
7779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7780     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7782     break 2
7783   fi
7784 done
7785   done
7786 IFS=$as_save_IFS
7787 
7788   ;;
7789 esac
7790 fi
7791 EXPR=$ac_cv_path_EXPR
7792 if test -n "$EXPR"; then
7793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7794 $as_echo "$EXPR" >&6; }
7795 else
7796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7797 $as_echo "no" >&6; }
7798 fi
7799 
7800 
7801           if test "x$EXPR" = x; then
7802             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7803           fi
7804         else
7805           # Otherwise we believe it is a complete path. Use it as it is.
7806           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7807 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7808           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7809 $as_echo_n "checking for EXPR... " >&6; }
7810           if test ! -x "$tool_specified"; then
7811             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7812 $as_echo "not found" >&6; }
7813             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7814           fi
7815           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7816 $as_echo "$tool_specified" >&6; }
7817         fi
7818       fi
7819     fi
7820 
7821   fi
7822 
7823 
7824 
7825   if test "x$EXPR" = x; then
7826     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7827   fi
7828 
7829 
7830 
7831 
7832 
7833   # Publish this variable in the help.
7834 
7835 
7836   if [ -z "${FILE+x}" ]; then
7837     # The variable is not set by user, try to locate tool using the code snippet
7838     for ac_prog in file
7839 do
7840   # Extract the first word of "$ac_prog", so it can be a program name with args.
7841 set dummy $ac_prog; ac_word=$2
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7843 $as_echo_n "checking for $ac_word... " >&6; }
7844 if ${ac_cv_path_FILE+:} false; then :
7845   $as_echo_n "(cached) " >&6
7846 else
7847   case $FILE in
7848   [\\/]* | ?:[\\/]*)
7849   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7850   ;;
7851   *)
7852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7853 for as_dir in $PATH
7854 do
7855   IFS=$as_save_IFS
7856   test -z "$as_dir" && as_dir=.
7857     for ac_exec_ext in '' $ac_executable_extensions; do
7858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7859     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7861     break 2
7862   fi
7863 done
7864   done
7865 IFS=$as_save_IFS
7866 
7867   ;;
7868 esac
7869 fi
7870 FILE=$ac_cv_path_FILE
7871 if test -n "$FILE"; then
7872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7873 $as_echo "$FILE" >&6; }
7874 else
7875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7876 $as_echo "no" >&6; }
7877 fi
7878 
7879 
7880   test -n "$FILE" && break
7881 done
7882 
7883   else
7884     # The variable is set, but is it from the command line or the environment?
7885 
7886     # Try to remove the string !FILE! from our list.
7887     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7888     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7889       # If it failed, the variable was not from the command line. Ignore it,
7890       # but warn the user (except for BASH, which is always set by the calling BASH).
7891       if test "xFILE" != xBASH; then
7892         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7893 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7894       fi
7895       # Try to locate tool using the code snippet
7896       for ac_prog in file
7897 do
7898   # Extract the first word of "$ac_prog", so it can be a program name with args.
7899 set dummy $ac_prog; ac_word=$2
7900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7901 $as_echo_n "checking for $ac_word... " >&6; }
7902 if ${ac_cv_path_FILE+:} false; then :
7903   $as_echo_n "(cached) " >&6
7904 else
7905   case $FILE in
7906   [\\/]* | ?:[\\/]*)
7907   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7908   ;;
7909   *)
7910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7911 for as_dir in $PATH
7912 do
7913   IFS=$as_save_IFS
7914   test -z "$as_dir" && as_dir=.
7915     for ac_exec_ext in '' $ac_executable_extensions; do
7916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7917     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7919     break 2
7920   fi
7921 done
7922   done
7923 IFS=$as_save_IFS
7924 
7925   ;;
7926 esac
7927 fi
7928 FILE=$ac_cv_path_FILE
7929 if test -n "$FILE"; then
7930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7931 $as_echo "$FILE" >&6; }
7932 else
7933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7934 $as_echo "no" >&6; }
7935 fi
7936 
7937 
7938   test -n "$FILE" && break
7939 done
7940 
7941     else
7942       # If it succeeded, then it was overridden by the user. We will use it
7943       # for the tool.
7944 
7945       # First remove it from the list of overridden variables, so we can test
7946       # for unknown variables in the end.
7947       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7948 
7949       # Check if we try to supply an empty value
7950       if test "x$FILE" = x; then
7951         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7952 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7953         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7954 $as_echo_n "checking for FILE... " >&6; }
7955         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7956 $as_echo "disabled" >&6; }
7957       else
7958         # Check if the provided tool contains a complete path.
7959         tool_specified="$FILE"
7960         tool_basename="${tool_specified##*/}"
7961         if test "x$tool_basename" = "x$tool_specified"; then
7962           # A command without a complete path is provided, search $PATH.
7963           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7964 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7965           # Extract the first word of "$tool_basename", so it can be a program name with args.
7966 set dummy $tool_basename; ac_word=$2
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7968 $as_echo_n "checking for $ac_word... " >&6; }
7969 if ${ac_cv_path_FILE+:} false; then :
7970   $as_echo_n "(cached) " >&6
7971 else
7972   case $FILE in
7973   [\\/]* | ?:[\\/]*)
7974   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7975   ;;
7976   *)
7977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7978 for as_dir in $PATH
7979 do
7980   IFS=$as_save_IFS
7981   test -z "$as_dir" && as_dir=.
7982     for ac_exec_ext in '' $ac_executable_extensions; do
7983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7984     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7986     break 2
7987   fi
7988 done
7989   done
7990 IFS=$as_save_IFS
7991 
7992   ;;
7993 esac
7994 fi
7995 FILE=$ac_cv_path_FILE
7996 if test -n "$FILE"; then
7997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7998 $as_echo "$FILE" >&6; }
7999 else
8000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8001 $as_echo "no" >&6; }
8002 fi
8003 
8004 
8005           if test "x$FILE" = x; then
8006             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8007           fi
8008         else
8009           # Otherwise we believe it is a complete path. Use it as it is.
8010           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8011 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8012           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8013 $as_echo_n "checking for FILE... " >&6; }
8014           if test ! -x "$tool_specified"; then
8015             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8016 $as_echo "not found" >&6; }
8017             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8018           fi
8019           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8020 $as_echo "$tool_specified" >&6; }
8021         fi
8022       fi
8023     fi
8024 
8025   fi
8026 
8027 
8028 
8029   if test "x$FILE" = x; then
8030     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8031   fi
8032 
8033 
8034 
8035 
8036 
8037   # Publish this variable in the help.
8038 
8039 
8040   if [ -z "${FIND+x}" ]; then
8041     # The variable is not set by user, try to locate tool using the code snippet
8042     for ac_prog in find
8043 do
8044   # Extract the first word of "$ac_prog", so it can be a program name with args.
8045 set dummy $ac_prog; ac_word=$2
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8047 $as_echo_n "checking for $ac_word... " >&6; }
8048 if ${ac_cv_path_FIND+:} false; then :
8049   $as_echo_n "(cached) " >&6
8050 else
8051   case $FIND in
8052   [\\/]* | ?:[\\/]*)
8053   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8054   ;;
8055   *)
8056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8057 for as_dir in $PATH
8058 do
8059   IFS=$as_save_IFS
8060   test -z "$as_dir" && as_dir=.
8061     for ac_exec_ext in '' $ac_executable_extensions; do
8062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8063     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8065     break 2
8066   fi
8067 done
8068   done
8069 IFS=$as_save_IFS
8070 
8071   ;;
8072 esac
8073 fi
8074 FIND=$ac_cv_path_FIND
8075 if test -n "$FIND"; then
8076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8077 $as_echo "$FIND" >&6; }
8078 else
8079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8080 $as_echo "no" >&6; }
8081 fi
8082 
8083 
8084   test -n "$FIND" && break
8085 done
8086 
8087   else
8088     # The variable is set, but is it from the command line or the environment?
8089 
8090     # Try to remove the string !FIND! from our list.
8091     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8092     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8093       # If it failed, the variable was not from the command line. Ignore it,
8094       # but warn the user (except for BASH, which is always set by the calling BASH).
8095       if test "xFIND" != xBASH; then
8096         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8097 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8098       fi
8099       # Try to locate tool using the code snippet
8100       for ac_prog in find
8101 do
8102   # Extract the first word of "$ac_prog", so it can be a program name with args.
8103 set dummy $ac_prog; ac_word=$2
8104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8105 $as_echo_n "checking for $ac_word... " >&6; }
8106 if ${ac_cv_path_FIND+:} false; then :
8107   $as_echo_n "(cached) " >&6
8108 else
8109   case $FIND in
8110   [\\/]* | ?:[\\/]*)
8111   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8112   ;;
8113   *)
8114   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8115 for as_dir in $PATH
8116 do
8117   IFS=$as_save_IFS
8118   test -z "$as_dir" && as_dir=.
8119     for ac_exec_ext in '' $ac_executable_extensions; do
8120   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8121     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8122     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8123     break 2
8124   fi
8125 done
8126   done
8127 IFS=$as_save_IFS
8128 
8129   ;;
8130 esac
8131 fi
8132 FIND=$ac_cv_path_FIND
8133 if test -n "$FIND"; then
8134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8135 $as_echo "$FIND" >&6; }
8136 else
8137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8138 $as_echo "no" >&6; }
8139 fi
8140 
8141 
8142   test -n "$FIND" && break
8143 done
8144 
8145     else
8146       # If it succeeded, then it was overridden by the user. We will use it
8147       # for the tool.
8148 
8149       # First remove it from the list of overridden variables, so we can test
8150       # for unknown variables in the end.
8151       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8152 
8153       # Check if we try to supply an empty value
8154       if test "x$FIND" = x; then
8155         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8156 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8157         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8158 $as_echo_n "checking for FIND... " >&6; }
8159         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8160 $as_echo "disabled" >&6; }
8161       else
8162         # Check if the provided tool contains a complete path.
8163         tool_specified="$FIND"
8164         tool_basename="${tool_specified##*/}"
8165         if test "x$tool_basename" = "x$tool_specified"; then
8166           # A command without a complete path is provided, search $PATH.
8167           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8168 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8169           # Extract the first word of "$tool_basename", so it can be a program name with args.
8170 set dummy $tool_basename; ac_word=$2
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8172 $as_echo_n "checking for $ac_word... " >&6; }
8173 if ${ac_cv_path_FIND+:} false; then :
8174   $as_echo_n "(cached) " >&6
8175 else
8176   case $FIND in
8177   [\\/]* | ?:[\\/]*)
8178   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8179   ;;
8180   *)
8181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8182 for as_dir in $PATH
8183 do
8184   IFS=$as_save_IFS
8185   test -z "$as_dir" && as_dir=.
8186     for ac_exec_ext in '' $ac_executable_extensions; do
8187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8188     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8190     break 2
8191   fi
8192 done
8193   done
8194 IFS=$as_save_IFS
8195 
8196   ;;
8197 esac
8198 fi
8199 FIND=$ac_cv_path_FIND
8200 if test -n "$FIND"; then
8201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8202 $as_echo "$FIND" >&6; }
8203 else
8204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205 $as_echo "no" >&6; }
8206 fi
8207 
8208 
8209           if test "x$FIND" = x; then
8210             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8211           fi
8212         else
8213           # Otherwise we believe it is a complete path. Use it as it is.
8214           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8215 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8216           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8217 $as_echo_n "checking for FIND... " >&6; }
8218           if test ! -x "$tool_specified"; then
8219             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8220 $as_echo "not found" >&6; }
8221             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8222           fi
8223           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8224 $as_echo "$tool_specified" >&6; }
8225         fi
8226       fi
8227     fi
8228 
8229   fi
8230 
8231 
8232 
8233   if test "x$FIND" = x; then
8234     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8235   fi
8236 
8237 
8238 
8239 
8240 
8241   # Publish this variable in the help.
8242 
8243 
8244   if [ -z "${HEAD+x}" ]; then
8245     # The variable is not set by user, try to locate tool using the code snippet
8246     for ac_prog in head
8247 do
8248   # Extract the first word of "$ac_prog", so it can be a program name with args.
8249 set dummy $ac_prog; ac_word=$2
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8251 $as_echo_n "checking for $ac_word... " >&6; }
8252 if ${ac_cv_path_HEAD+:} false; then :
8253   $as_echo_n "(cached) " >&6
8254 else
8255   case $HEAD in
8256   [\\/]* | ?:[\\/]*)
8257   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8258   ;;
8259   *)
8260   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8261 for as_dir in $PATH
8262 do
8263   IFS=$as_save_IFS
8264   test -z "$as_dir" && as_dir=.
8265     for ac_exec_ext in '' $ac_executable_extensions; do
8266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8267     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8269     break 2
8270   fi
8271 done
8272   done
8273 IFS=$as_save_IFS
8274 
8275   ;;
8276 esac
8277 fi
8278 HEAD=$ac_cv_path_HEAD
8279 if test -n "$HEAD"; then
8280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8281 $as_echo "$HEAD" >&6; }
8282 else
8283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8284 $as_echo "no" >&6; }
8285 fi
8286 
8287 
8288   test -n "$HEAD" && break
8289 done
8290 
8291   else
8292     # The variable is set, but is it from the command line or the environment?
8293 
8294     # Try to remove the string !HEAD! from our list.
8295     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8296     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8297       # If it failed, the variable was not from the command line. Ignore it,
8298       # but warn the user (except for BASH, which is always set by the calling BASH).
8299       if test "xHEAD" != xBASH; then
8300         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8301 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8302       fi
8303       # Try to locate tool using the code snippet
8304       for ac_prog in head
8305 do
8306   # Extract the first word of "$ac_prog", so it can be a program name with args.
8307 set dummy $ac_prog; ac_word=$2
8308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8309 $as_echo_n "checking for $ac_word... " >&6; }
8310 if ${ac_cv_path_HEAD+:} false; then :
8311   $as_echo_n "(cached) " >&6
8312 else
8313   case $HEAD in
8314   [\\/]* | ?:[\\/]*)
8315   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8316   ;;
8317   *)
8318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8319 for as_dir in $PATH
8320 do
8321   IFS=$as_save_IFS
8322   test -z "$as_dir" && as_dir=.
8323     for ac_exec_ext in '' $ac_executable_extensions; do
8324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8325     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8327     break 2
8328   fi
8329 done
8330   done
8331 IFS=$as_save_IFS
8332 
8333   ;;
8334 esac
8335 fi
8336 HEAD=$ac_cv_path_HEAD
8337 if test -n "$HEAD"; then
8338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8339 $as_echo "$HEAD" >&6; }
8340 else
8341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8342 $as_echo "no" >&6; }
8343 fi
8344 
8345 
8346   test -n "$HEAD" && break
8347 done
8348 
8349     else
8350       # If it succeeded, then it was overridden by the user. We will use it
8351       # for the tool.
8352 
8353       # First remove it from the list of overridden variables, so we can test
8354       # for unknown variables in the end.
8355       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8356 
8357       # Check if we try to supply an empty value
8358       if test "x$HEAD" = x; then
8359         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8360 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8361         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8362 $as_echo_n "checking for HEAD... " >&6; }
8363         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8364 $as_echo "disabled" >&6; }
8365       else
8366         # Check if the provided tool contains a complete path.
8367         tool_specified="$HEAD"
8368         tool_basename="${tool_specified##*/}"
8369         if test "x$tool_basename" = "x$tool_specified"; then
8370           # A command without a complete path is provided, search $PATH.
8371           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8372 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8373           # Extract the first word of "$tool_basename", so it can be a program name with args.
8374 set dummy $tool_basename; ac_word=$2
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8376 $as_echo_n "checking for $ac_word... " >&6; }
8377 if ${ac_cv_path_HEAD+:} false; then :
8378   $as_echo_n "(cached) " >&6
8379 else
8380   case $HEAD in
8381   [\\/]* | ?:[\\/]*)
8382   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8383   ;;
8384   *)
8385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8386 for as_dir in $PATH
8387 do
8388   IFS=$as_save_IFS
8389   test -z "$as_dir" && as_dir=.
8390     for ac_exec_ext in '' $ac_executable_extensions; do
8391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8392     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8394     break 2
8395   fi
8396 done
8397   done
8398 IFS=$as_save_IFS
8399 
8400   ;;
8401 esac
8402 fi
8403 HEAD=$ac_cv_path_HEAD
8404 if test -n "$HEAD"; then
8405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8406 $as_echo "$HEAD" >&6; }
8407 else
8408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8409 $as_echo "no" >&6; }
8410 fi
8411 
8412 
8413           if test "x$HEAD" = x; then
8414             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8415           fi
8416         else
8417           # Otherwise we believe it is a complete path. Use it as it is.
8418           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8419 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8420           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8421 $as_echo_n "checking for HEAD... " >&6; }
8422           if test ! -x "$tool_specified"; then
8423             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8424 $as_echo "not found" >&6; }
8425             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8426           fi
8427           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8428 $as_echo "$tool_specified" >&6; }
8429         fi
8430       fi
8431     fi
8432 
8433   fi
8434 
8435 
8436 
8437   if test "x$HEAD" = x; then
8438     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8439   fi
8440 
8441 
8442 
8443 
8444 
8445   # Publish this variable in the help.
8446 
8447 
8448   if [ -z "${GUNZIP+x}" ]; then
8449     # The variable is not set by user, try to locate tool using the code snippet
8450     for ac_prog in gunzip
8451 do
8452   # Extract the first word of "$ac_prog", so it can be a program name with args.
8453 set dummy $ac_prog; ac_word=$2
8454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8455 $as_echo_n "checking for $ac_word... " >&6; }
8456 if ${ac_cv_path_GUNZIP+:} false; then :
8457   $as_echo_n "(cached) " >&6
8458 else
8459   case $GUNZIP in
8460   [\\/]* | ?:[\\/]*)
8461   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8462   ;;
8463   *)
8464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8465 for as_dir in $PATH
8466 do
8467   IFS=$as_save_IFS
8468   test -z "$as_dir" && as_dir=.
8469     for ac_exec_ext in '' $ac_executable_extensions; do
8470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8471     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8473     break 2
8474   fi
8475 done
8476   done
8477 IFS=$as_save_IFS
8478 
8479   ;;
8480 esac
8481 fi
8482 GUNZIP=$ac_cv_path_GUNZIP
8483 if test -n "$GUNZIP"; then
8484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8485 $as_echo "$GUNZIP" >&6; }
8486 else
8487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8488 $as_echo "no" >&6; }
8489 fi
8490 
8491 
8492   test -n "$GUNZIP" && break
8493 done
8494 
8495   else
8496     # The variable is set, but is it from the command line or the environment?
8497 
8498     # Try to remove the string !GUNZIP! from our list.
8499     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8500     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8501       # If it failed, the variable was not from the command line. Ignore it,
8502       # but warn the user (except for BASH, which is always set by the calling BASH).
8503       if test "xGUNZIP" != xBASH; then
8504         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8505 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8506       fi
8507       # Try to locate tool using the code snippet
8508       for ac_prog in gunzip
8509 do
8510   # Extract the first word of "$ac_prog", so it can be a program name with args.
8511 set dummy $ac_prog; ac_word=$2
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8513 $as_echo_n "checking for $ac_word... " >&6; }
8514 if ${ac_cv_path_GUNZIP+:} false; then :
8515   $as_echo_n "(cached) " >&6
8516 else
8517   case $GUNZIP in
8518   [\\/]* | ?:[\\/]*)
8519   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8520   ;;
8521   *)
8522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8523 for as_dir in $PATH
8524 do
8525   IFS=$as_save_IFS
8526   test -z "$as_dir" && as_dir=.
8527     for ac_exec_ext in '' $ac_executable_extensions; do
8528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8529     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8531     break 2
8532   fi
8533 done
8534   done
8535 IFS=$as_save_IFS
8536 
8537   ;;
8538 esac
8539 fi
8540 GUNZIP=$ac_cv_path_GUNZIP
8541 if test -n "$GUNZIP"; then
8542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8543 $as_echo "$GUNZIP" >&6; }
8544 else
8545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8546 $as_echo "no" >&6; }
8547 fi
8548 
8549 
8550   test -n "$GUNZIP" && break
8551 done
8552 
8553     else
8554       # If it succeeded, then it was overridden by the user. We will use it
8555       # for the tool.
8556 
8557       # First remove it from the list of overridden variables, so we can test
8558       # for unknown variables in the end.
8559       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8560 
8561       # Check if we try to supply an empty value
8562       if test "x$GUNZIP" = x; then
8563         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8564 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8565         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8566 $as_echo_n "checking for GUNZIP... " >&6; }
8567         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8568 $as_echo "disabled" >&6; }
8569       else
8570         # Check if the provided tool contains a complete path.
8571         tool_specified="$GUNZIP"
8572         tool_basename="${tool_specified##*/}"
8573         if test "x$tool_basename" = "x$tool_specified"; then
8574           # A command without a complete path is provided, search $PATH.
8575           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8576 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8577           # Extract the first word of "$tool_basename", so it can be a program name with args.
8578 set dummy $tool_basename; ac_word=$2
8579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8580 $as_echo_n "checking for $ac_word... " >&6; }
8581 if ${ac_cv_path_GUNZIP+:} false; then :
8582   $as_echo_n "(cached) " >&6
8583 else
8584   case $GUNZIP in
8585   [\\/]* | ?:[\\/]*)
8586   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8587   ;;
8588   *)
8589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8590 for as_dir in $PATH
8591 do
8592   IFS=$as_save_IFS
8593   test -z "$as_dir" && as_dir=.
8594     for ac_exec_ext in '' $ac_executable_extensions; do
8595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8596     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8598     break 2
8599   fi
8600 done
8601   done
8602 IFS=$as_save_IFS
8603 
8604   ;;
8605 esac
8606 fi
8607 GUNZIP=$ac_cv_path_GUNZIP
8608 if test -n "$GUNZIP"; then
8609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8610 $as_echo "$GUNZIP" >&6; }
8611 else
8612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8613 $as_echo "no" >&6; }
8614 fi
8615 
8616 
8617           if test "x$GUNZIP" = x; then
8618             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8619           fi
8620         else
8621           # Otherwise we believe it is a complete path. Use it as it is.
8622           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8623 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8624           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8625 $as_echo_n "checking for GUNZIP... " >&6; }
8626           if test ! -x "$tool_specified"; then
8627             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8628 $as_echo "not found" >&6; }
8629             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8630           fi
8631           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8632 $as_echo "$tool_specified" >&6; }
8633         fi
8634       fi
8635     fi
8636 
8637   fi
8638 
8639 
8640 
8641   if test "x$GUNZIP" = x; then
8642     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8643   fi
8644 
8645 
8646 
8647 
8648 
8649   # Publish this variable in the help.
8650 
8651 
8652   if [ -z "${GZIP+x}" ]; then
8653     # The variable is not set by user, try to locate tool using the code snippet
8654     for ac_prog in pigz gzip
8655 do
8656   # Extract the first word of "$ac_prog", so it can be a program name with args.
8657 set dummy $ac_prog; ac_word=$2
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8659 $as_echo_n "checking for $ac_word... " >&6; }
8660 if ${ac_cv_path_GZIP+:} false; then :
8661   $as_echo_n "(cached) " >&6
8662 else
8663   case $GZIP in
8664   [\\/]* | ?:[\\/]*)
8665   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8666   ;;
8667   *)
8668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8669 for as_dir in $PATH
8670 do
8671   IFS=$as_save_IFS
8672   test -z "$as_dir" && as_dir=.
8673     for ac_exec_ext in '' $ac_executable_extensions; do
8674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8675     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8677     break 2
8678   fi
8679 done
8680   done
8681 IFS=$as_save_IFS
8682 
8683   ;;
8684 esac
8685 fi
8686 GZIP=$ac_cv_path_GZIP
8687 if test -n "$GZIP"; then
8688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8689 $as_echo "$GZIP" >&6; }
8690 else
8691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8692 $as_echo "no" >&6; }
8693 fi
8694 
8695 
8696   test -n "$GZIP" && break
8697 done
8698 
8699   else
8700     # The variable is set, but is it from the command line or the environment?
8701 
8702     # Try to remove the string !GZIP! from our list.
8703     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8704     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8705       # If it failed, the variable was not from the command line. Ignore it,
8706       # but warn the user (except for BASH, which is always set by the calling BASH).
8707       if test "xGZIP" != xBASH; then
8708         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8709 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8710       fi
8711       # Try to locate tool using the code snippet
8712       for ac_prog in pigz gzip
8713 do
8714   # Extract the first word of "$ac_prog", so it can be a program name with args.
8715 set dummy $ac_prog; ac_word=$2
8716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8717 $as_echo_n "checking for $ac_word... " >&6; }
8718 if ${ac_cv_path_GZIP+:} false; then :
8719   $as_echo_n "(cached) " >&6
8720 else
8721   case $GZIP in
8722   [\\/]* | ?:[\\/]*)
8723   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8724   ;;
8725   *)
8726   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8727 for as_dir in $PATH
8728 do
8729   IFS=$as_save_IFS
8730   test -z "$as_dir" && as_dir=.
8731     for ac_exec_ext in '' $ac_executable_extensions; do
8732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8733     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8735     break 2
8736   fi
8737 done
8738   done
8739 IFS=$as_save_IFS
8740 
8741   ;;
8742 esac
8743 fi
8744 GZIP=$ac_cv_path_GZIP
8745 if test -n "$GZIP"; then
8746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8747 $as_echo "$GZIP" >&6; }
8748 else
8749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8750 $as_echo "no" >&6; }
8751 fi
8752 
8753 
8754   test -n "$GZIP" && break
8755 done
8756 
8757     else
8758       # If it succeeded, then it was overridden by the user. We will use it
8759       # for the tool.
8760 
8761       # First remove it from the list of overridden variables, so we can test
8762       # for unknown variables in the end.
8763       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8764 
8765       # Check if we try to supply an empty value
8766       if test "x$GZIP" = x; then
8767         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8768 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8769         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8770 $as_echo_n "checking for GZIP... " >&6; }
8771         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8772 $as_echo "disabled" >&6; }
8773       else
8774         # Check if the provided tool contains a complete path.
8775         tool_specified="$GZIP"
8776         tool_basename="${tool_specified##*/}"
8777         if test "x$tool_basename" = "x$tool_specified"; then
8778           # A command without a complete path is provided, search $PATH.
8779           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8780 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8781           # Extract the first word of "$tool_basename", so it can be a program name with args.
8782 set dummy $tool_basename; ac_word=$2
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8784 $as_echo_n "checking for $ac_word... " >&6; }
8785 if ${ac_cv_path_GZIP+:} false; then :
8786   $as_echo_n "(cached) " >&6
8787 else
8788   case $GZIP in
8789   [\\/]* | ?:[\\/]*)
8790   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8791   ;;
8792   *)
8793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8794 for as_dir in $PATH
8795 do
8796   IFS=$as_save_IFS
8797   test -z "$as_dir" && as_dir=.
8798     for ac_exec_ext in '' $ac_executable_extensions; do
8799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8800     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8802     break 2
8803   fi
8804 done
8805   done
8806 IFS=$as_save_IFS
8807 
8808   ;;
8809 esac
8810 fi
8811 GZIP=$ac_cv_path_GZIP
8812 if test -n "$GZIP"; then
8813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8814 $as_echo "$GZIP" >&6; }
8815 else
8816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8817 $as_echo "no" >&6; }
8818 fi
8819 
8820 
8821           if test "x$GZIP" = x; then
8822             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8823           fi
8824         else
8825           # Otherwise we believe it is a complete path. Use it as it is.
8826           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8827 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8828           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8829 $as_echo_n "checking for GZIP... " >&6; }
8830           if test ! -x "$tool_specified"; then
8831             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8832 $as_echo "not found" >&6; }
8833             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8834           fi
8835           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8836 $as_echo "$tool_specified" >&6; }
8837         fi
8838       fi
8839     fi
8840 
8841   fi
8842 
8843 
8844 
8845   if test "x$GZIP" = x; then
8846     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8847   fi
8848 
8849 
8850 
8851 
8852 
8853   # Publish this variable in the help.
8854 
8855 
8856   if [ -z "${LN+x}" ]; then
8857     # The variable is not set by user, try to locate tool using the code snippet
8858     for ac_prog in ln
8859 do
8860   # Extract the first word of "$ac_prog", so it can be a program name with args.
8861 set dummy $ac_prog; ac_word=$2
8862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8863 $as_echo_n "checking for $ac_word... " >&6; }
8864 if ${ac_cv_path_LN+:} false; then :
8865   $as_echo_n "(cached) " >&6
8866 else
8867   case $LN in
8868   [\\/]* | ?:[\\/]*)
8869   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8870   ;;
8871   *)
8872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8873 for as_dir in $PATH
8874 do
8875   IFS=$as_save_IFS
8876   test -z "$as_dir" && as_dir=.
8877     for ac_exec_ext in '' $ac_executable_extensions; do
8878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8879     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8881     break 2
8882   fi
8883 done
8884   done
8885 IFS=$as_save_IFS
8886 
8887   ;;
8888 esac
8889 fi
8890 LN=$ac_cv_path_LN
8891 if test -n "$LN"; then
8892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8893 $as_echo "$LN" >&6; }
8894 else
8895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896 $as_echo "no" >&6; }
8897 fi
8898 
8899 
8900   test -n "$LN" && break
8901 done
8902 
8903   else
8904     # The variable is set, but is it from the command line or the environment?
8905 
8906     # Try to remove the string !LN! from our list.
8907     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8908     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8909       # If it failed, the variable was not from the command line. Ignore it,
8910       # but warn the user (except for BASH, which is always set by the calling BASH).
8911       if test "xLN" != xBASH; then
8912         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8913 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8914       fi
8915       # Try to locate tool using the code snippet
8916       for ac_prog in ln
8917 do
8918   # Extract the first word of "$ac_prog", so it can be a program name with args.
8919 set dummy $ac_prog; ac_word=$2
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8921 $as_echo_n "checking for $ac_word... " >&6; }
8922 if ${ac_cv_path_LN+:} false; then :
8923   $as_echo_n "(cached) " >&6
8924 else
8925   case $LN in
8926   [\\/]* | ?:[\\/]*)
8927   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8928   ;;
8929   *)
8930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8931 for as_dir in $PATH
8932 do
8933   IFS=$as_save_IFS
8934   test -z "$as_dir" && as_dir=.
8935     for ac_exec_ext in '' $ac_executable_extensions; do
8936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8937     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8939     break 2
8940   fi
8941 done
8942   done
8943 IFS=$as_save_IFS
8944 
8945   ;;
8946 esac
8947 fi
8948 LN=$ac_cv_path_LN
8949 if test -n "$LN"; then
8950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8951 $as_echo "$LN" >&6; }
8952 else
8953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8954 $as_echo "no" >&6; }
8955 fi
8956 
8957 
8958   test -n "$LN" && break
8959 done
8960 
8961     else
8962       # If it succeeded, then it was overridden by the user. We will use it
8963       # for the tool.
8964 
8965       # First remove it from the list of overridden variables, so we can test
8966       # for unknown variables in the end.
8967       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8968 
8969       # Check if we try to supply an empty value
8970       if test "x$LN" = x; then
8971         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8972 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8974 $as_echo_n "checking for LN... " >&6; }
8975         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8976 $as_echo "disabled" >&6; }
8977       else
8978         # Check if the provided tool contains a complete path.
8979         tool_specified="$LN"
8980         tool_basename="${tool_specified##*/}"
8981         if test "x$tool_basename" = "x$tool_specified"; then
8982           # A command without a complete path is provided, search $PATH.
8983           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8984 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8985           # Extract the first word of "$tool_basename", so it can be a program name with args.
8986 set dummy $tool_basename; ac_word=$2
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8988 $as_echo_n "checking for $ac_word... " >&6; }
8989 if ${ac_cv_path_LN+:} false; then :
8990   $as_echo_n "(cached) " >&6
8991 else
8992   case $LN in
8993   [\\/]* | ?:[\\/]*)
8994   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8995   ;;
8996   *)
8997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8998 for as_dir in $PATH
8999 do
9000   IFS=$as_save_IFS
9001   test -z "$as_dir" && as_dir=.
9002     for ac_exec_ext in '' $ac_executable_extensions; do
9003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9004     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9006     break 2
9007   fi
9008 done
9009   done
9010 IFS=$as_save_IFS
9011 
9012   ;;
9013 esac
9014 fi
9015 LN=$ac_cv_path_LN
9016 if test -n "$LN"; then
9017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9018 $as_echo "$LN" >&6; }
9019 else
9020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9021 $as_echo "no" >&6; }
9022 fi
9023 
9024 
9025           if test "x$LN" = x; then
9026             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9027           fi
9028         else
9029           # Otherwise we believe it is a complete path. Use it as it is.
9030           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9031 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9032           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9033 $as_echo_n "checking for LN... " >&6; }
9034           if test ! -x "$tool_specified"; then
9035             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9036 $as_echo "not found" >&6; }
9037             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9038           fi
9039           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9040 $as_echo "$tool_specified" >&6; }
9041         fi
9042       fi
9043     fi
9044 
9045   fi
9046 
9047 
9048 
9049   if test "x$LN" = x; then
9050     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9051   fi
9052 
9053 
9054 
9055 
9056 
9057   # Publish this variable in the help.
9058 
9059 
9060   if [ -z "${LS+x}" ]; then
9061     # The variable is not set by user, try to locate tool using the code snippet
9062     for ac_prog in ls
9063 do
9064   # Extract the first word of "$ac_prog", so it can be a program name with args.
9065 set dummy $ac_prog; ac_word=$2
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9067 $as_echo_n "checking for $ac_word... " >&6; }
9068 if ${ac_cv_path_LS+:} false; then :
9069   $as_echo_n "(cached) " >&6
9070 else
9071   case $LS in
9072   [\\/]* | ?:[\\/]*)
9073   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9074   ;;
9075   *)
9076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9077 for as_dir in $PATH
9078 do
9079   IFS=$as_save_IFS
9080   test -z "$as_dir" && as_dir=.
9081     for ac_exec_ext in '' $ac_executable_extensions; do
9082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9083     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9085     break 2
9086   fi
9087 done
9088   done
9089 IFS=$as_save_IFS
9090 
9091   ;;
9092 esac
9093 fi
9094 LS=$ac_cv_path_LS
9095 if test -n "$LS"; then
9096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9097 $as_echo "$LS" >&6; }
9098 else
9099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9100 $as_echo "no" >&6; }
9101 fi
9102 
9103 
9104   test -n "$LS" && break
9105 done
9106 
9107   else
9108     # The variable is set, but is it from the command line or the environment?
9109 
9110     # Try to remove the string !LS! from our list.
9111     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9112     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9113       # If it failed, the variable was not from the command line. Ignore it,
9114       # but warn the user (except for BASH, which is always set by the calling BASH).
9115       if test "xLS" != xBASH; then
9116         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9117 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9118       fi
9119       # Try to locate tool using the code snippet
9120       for ac_prog in ls
9121 do
9122   # Extract the first word of "$ac_prog", so it can be a program name with args.
9123 set dummy $ac_prog; ac_word=$2
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9125 $as_echo_n "checking for $ac_word... " >&6; }
9126 if ${ac_cv_path_LS+:} false; then :
9127   $as_echo_n "(cached) " >&6
9128 else
9129   case $LS in
9130   [\\/]* | ?:[\\/]*)
9131   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9132   ;;
9133   *)
9134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9135 for as_dir in $PATH
9136 do
9137   IFS=$as_save_IFS
9138   test -z "$as_dir" && as_dir=.
9139     for ac_exec_ext in '' $ac_executable_extensions; do
9140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9141     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9143     break 2
9144   fi
9145 done
9146   done
9147 IFS=$as_save_IFS
9148 
9149   ;;
9150 esac
9151 fi
9152 LS=$ac_cv_path_LS
9153 if test -n "$LS"; then
9154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9155 $as_echo "$LS" >&6; }
9156 else
9157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158 $as_echo "no" >&6; }
9159 fi
9160 
9161 
9162   test -n "$LS" && break
9163 done
9164 
9165     else
9166       # If it succeeded, then it was overridden by the user. We will use it
9167       # for the tool.
9168 
9169       # First remove it from the list of overridden variables, so we can test
9170       # for unknown variables in the end.
9171       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9172 
9173       # Check if we try to supply an empty value
9174       if test "x$LS" = x; then
9175         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9176 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9177         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9178 $as_echo_n "checking for LS... " >&6; }
9179         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9180 $as_echo "disabled" >&6; }
9181       else
9182         # Check if the provided tool contains a complete path.
9183         tool_specified="$LS"
9184         tool_basename="${tool_specified##*/}"
9185         if test "x$tool_basename" = "x$tool_specified"; then
9186           # A command without a complete path is provided, search $PATH.
9187           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9188 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9189           # Extract the first word of "$tool_basename", so it can be a program name with args.
9190 set dummy $tool_basename; ac_word=$2
9191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9192 $as_echo_n "checking for $ac_word... " >&6; }
9193 if ${ac_cv_path_LS+:} false; then :
9194   $as_echo_n "(cached) " >&6
9195 else
9196   case $LS in
9197   [\\/]* | ?:[\\/]*)
9198   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9199   ;;
9200   *)
9201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9202 for as_dir in $PATH
9203 do
9204   IFS=$as_save_IFS
9205   test -z "$as_dir" && as_dir=.
9206     for ac_exec_ext in '' $ac_executable_extensions; do
9207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9208     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9210     break 2
9211   fi
9212 done
9213   done
9214 IFS=$as_save_IFS
9215 
9216   ;;
9217 esac
9218 fi
9219 LS=$ac_cv_path_LS
9220 if test -n "$LS"; then
9221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9222 $as_echo "$LS" >&6; }
9223 else
9224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9225 $as_echo "no" >&6; }
9226 fi
9227 
9228 
9229           if test "x$LS" = x; then
9230             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9231           fi
9232         else
9233           # Otherwise we believe it is a complete path. Use it as it is.
9234           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9235 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9236           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9237 $as_echo_n "checking for LS... " >&6; }
9238           if test ! -x "$tool_specified"; then
9239             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9240 $as_echo "not found" >&6; }
9241             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9242           fi
9243           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9244 $as_echo "$tool_specified" >&6; }
9245         fi
9246       fi
9247     fi
9248 
9249   fi
9250 
9251 
9252 
9253   if test "x$LS" = x; then
9254     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9255   fi
9256 
9257 
9258 
9259 
9260 
9261   # Publish this variable in the help.
9262 
9263 
9264   if [ -z "${MKDIR+x}" ]; then
9265     # The variable is not set by user, try to locate tool using the code snippet
9266     for ac_prog in mkdir
9267 do
9268   # Extract the first word of "$ac_prog", so it can be a program name with args.
9269 set dummy $ac_prog; ac_word=$2
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9271 $as_echo_n "checking for $ac_word... " >&6; }
9272 if ${ac_cv_path_MKDIR+:} false; then :
9273   $as_echo_n "(cached) " >&6
9274 else
9275   case $MKDIR in
9276   [\\/]* | ?:[\\/]*)
9277   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9278   ;;
9279   *)
9280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9281 for as_dir in $PATH
9282 do
9283   IFS=$as_save_IFS
9284   test -z "$as_dir" && as_dir=.
9285     for ac_exec_ext in '' $ac_executable_extensions; do
9286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9287     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9289     break 2
9290   fi
9291 done
9292   done
9293 IFS=$as_save_IFS
9294 
9295   ;;
9296 esac
9297 fi
9298 MKDIR=$ac_cv_path_MKDIR
9299 if test -n "$MKDIR"; then
9300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9301 $as_echo "$MKDIR" >&6; }
9302 else
9303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9304 $as_echo "no" >&6; }
9305 fi
9306 
9307 
9308   test -n "$MKDIR" && break
9309 done
9310 
9311   else
9312     # The variable is set, but is it from the command line or the environment?
9313 
9314     # Try to remove the string !MKDIR! from our list.
9315     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9316     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9317       # If it failed, the variable was not from the command line. Ignore it,
9318       # but warn the user (except for BASH, which is always set by the calling BASH).
9319       if test "xMKDIR" != xBASH; then
9320         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9321 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9322       fi
9323       # Try to locate tool using the code snippet
9324       for ac_prog in mkdir
9325 do
9326   # Extract the first word of "$ac_prog", so it can be a program name with args.
9327 set dummy $ac_prog; ac_word=$2
9328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9329 $as_echo_n "checking for $ac_word... " >&6; }
9330 if ${ac_cv_path_MKDIR+:} false; then :
9331   $as_echo_n "(cached) " >&6
9332 else
9333   case $MKDIR in
9334   [\\/]* | ?:[\\/]*)
9335   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9336   ;;
9337   *)
9338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9339 for as_dir in $PATH
9340 do
9341   IFS=$as_save_IFS
9342   test -z "$as_dir" && as_dir=.
9343     for ac_exec_ext in '' $ac_executable_extensions; do
9344   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9345     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9347     break 2
9348   fi
9349 done
9350   done
9351 IFS=$as_save_IFS
9352 
9353   ;;
9354 esac
9355 fi
9356 MKDIR=$ac_cv_path_MKDIR
9357 if test -n "$MKDIR"; then
9358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9359 $as_echo "$MKDIR" >&6; }
9360 else
9361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9362 $as_echo "no" >&6; }
9363 fi
9364 
9365 
9366   test -n "$MKDIR" && break
9367 done
9368 
9369     else
9370       # If it succeeded, then it was overridden by the user. We will use it
9371       # for the tool.
9372 
9373       # First remove it from the list of overridden variables, so we can test
9374       # for unknown variables in the end.
9375       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9376 
9377       # Check if we try to supply an empty value
9378       if test "x$MKDIR" = x; then
9379         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9380 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9381         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9382 $as_echo_n "checking for MKDIR... " >&6; }
9383         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9384 $as_echo "disabled" >&6; }
9385       else
9386         # Check if the provided tool contains a complete path.
9387         tool_specified="$MKDIR"
9388         tool_basename="${tool_specified##*/}"
9389         if test "x$tool_basename" = "x$tool_specified"; then
9390           # A command without a complete path is provided, search $PATH.
9391           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9392 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9393           # Extract the first word of "$tool_basename", so it can be a program name with args.
9394 set dummy $tool_basename; ac_word=$2
9395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9396 $as_echo_n "checking for $ac_word... " >&6; }
9397 if ${ac_cv_path_MKDIR+:} false; then :
9398   $as_echo_n "(cached) " >&6
9399 else
9400   case $MKDIR in
9401   [\\/]* | ?:[\\/]*)
9402   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9403   ;;
9404   *)
9405   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9406 for as_dir in $PATH
9407 do
9408   IFS=$as_save_IFS
9409   test -z "$as_dir" && as_dir=.
9410     for ac_exec_ext in '' $ac_executable_extensions; do
9411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9412     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9414     break 2
9415   fi
9416 done
9417   done
9418 IFS=$as_save_IFS
9419 
9420   ;;
9421 esac
9422 fi
9423 MKDIR=$ac_cv_path_MKDIR
9424 if test -n "$MKDIR"; then
9425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9426 $as_echo "$MKDIR" >&6; }
9427 else
9428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9429 $as_echo "no" >&6; }
9430 fi
9431 
9432 
9433           if test "x$MKDIR" = x; then
9434             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9435           fi
9436         else
9437           # Otherwise we believe it is a complete path. Use it as it is.
9438           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9439 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9440           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9441 $as_echo_n "checking for MKDIR... " >&6; }
9442           if test ! -x "$tool_specified"; then
9443             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9444 $as_echo "not found" >&6; }
9445             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9446           fi
9447           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9448 $as_echo "$tool_specified" >&6; }
9449         fi
9450       fi
9451     fi
9452 
9453   fi
9454 
9455 
9456 
9457   if test "x$MKDIR" = x; then
9458     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9459   fi
9460 
9461 
9462 
9463 
9464 
9465   # Publish this variable in the help.
9466 
9467 
9468   if [ -z "${MKTEMP+x}" ]; then
9469     # The variable is not set by user, try to locate tool using the code snippet
9470     for ac_prog in mktemp
9471 do
9472   # Extract the first word of "$ac_prog", so it can be a program name with args.
9473 set dummy $ac_prog; ac_word=$2
9474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9475 $as_echo_n "checking for $ac_word... " >&6; }
9476 if ${ac_cv_path_MKTEMP+:} false; then :
9477   $as_echo_n "(cached) " >&6
9478 else
9479   case $MKTEMP in
9480   [\\/]* | ?:[\\/]*)
9481   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9482   ;;
9483   *)
9484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9485 for as_dir in $PATH
9486 do
9487   IFS=$as_save_IFS
9488   test -z "$as_dir" && as_dir=.
9489     for ac_exec_ext in '' $ac_executable_extensions; do
9490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9491     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9493     break 2
9494   fi
9495 done
9496   done
9497 IFS=$as_save_IFS
9498 
9499   ;;
9500 esac
9501 fi
9502 MKTEMP=$ac_cv_path_MKTEMP
9503 if test -n "$MKTEMP"; then
9504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9505 $as_echo "$MKTEMP" >&6; }
9506 else
9507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9508 $as_echo "no" >&6; }
9509 fi
9510 
9511 
9512   test -n "$MKTEMP" && break
9513 done
9514 
9515   else
9516     # The variable is set, but is it from the command line or the environment?
9517 
9518     # Try to remove the string !MKTEMP! from our list.
9519     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9520     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9521       # If it failed, the variable was not from the command line. Ignore it,
9522       # but warn the user (except for BASH, which is always set by the calling BASH).
9523       if test "xMKTEMP" != xBASH; then
9524         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9525 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9526       fi
9527       # Try to locate tool using the code snippet
9528       for ac_prog in mktemp
9529 do
9530   # Extract the first word of "$ac_prog", so it can be a program name with args.
9531 set dummy $ac_prog; ac_word=$2
9532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9533 $as_echo_n "checking for $ac_word... " >&6; }
9534 if ${ac_cv_path_MKTEMP+:} false; then :
9535   $as_echo_n "(cached) " >&6
9536 else
9537   case $MKTEMP in
9538   [\\/]* | ?:[\\/]*)
9539   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9540   ;;
9541   *)
9542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9543 for as_dir in $PATH
9544 do
9545   IFS=$as_save_IFS
9546   test -z "$as_dir" && as_dir=.
9547     for ac_exec_ext in '' $ac_executable_extensions; do
9548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9549     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9551     break 2
9552   fi
9553 done
9554   done
9555 IFS=$as_save_IFS
9556 
9557   ;;
9558 esac
9559 fi
9560 MKTEMP=$ac_cv_path_MKTEMP
9561 if test -n "$MKTEMP"; then
9562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9563 $as_echo "$MKTEMP" >&6; }
9564 else
9565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9566 $as_echo "no" >&6; }
9567 fi
9568 
9569 
9570   test -n "$MKTEMP" && break
9571 done
9572 
9573     else
9574       # If it succeeded, then it was overridden by the user. We will use it
9575       # for the tool.
9576 
9577       # First remove it from the list of overridden variables, so we can test
9578       # for unknown variables in the end.
9579       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9580 
9581       # Check if we try to supply an empty value
9582       if test "x$MKTEMP" = x; then
9583         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9584 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9585         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9586 $as_echo_n "checking for MKTEMP... " >&6; }
9587         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9588 $as_echo "disabled" >&6; }
9589       else
9590         # Check if the provided tool contains a complete path.
9591         tool_specified="$MKTEMP"
9592         tool_basename="${tool_specified##*/}"
9593         if test "x$tool_basename" = "x$tool_specified"; then
9594           # A command without a complete path is provided, search $PATH.
9595           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9596 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9597           # Extract the first word of "$tool_basename", so it can be a program name with args.
9598 set dummy $tool_basename; ac_word=$2
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9600 $as_echo_n "checking for $ac_word... " >&6; }
9601 if ${ac_cv_path_MKTEMP+:} false; then :
9602   $as_echo_n "(cached) " >&6
9603 else
9604   case $MKTEMP in
9605   [\\/]* | ?:[\\/]*)
9606   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9607   ;;
9608   *)
9609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9610 for as_dir in $PATH
9611 do
9612   IFS=$as_save_IFS
9613   test -z "$as_dir" && as_dir=.
9614     for ac_exec_ext in '' $ac_executable_extensions; do
9615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9616     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9618     break 2
9619   fi
9620 done
9621   done
9622 IFS=$as_save_IFS
9623 
9624   ;;
9625 esac
9626 fi
9627 MKTEMP=$ac_cv_path_MKTEMP
9628 if test -n "$MKTEMP"; then
9629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9630 $as_echo "$MKTEMP" >&6; }
9631 else
9632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9633 $as_echo "no" >&6; }
9634 fi
9635 
9636 
9637           if test "x$MKTEMP" = x; then
9638             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9639           fi
9640         else
9641           # Otherwise we believe it is a complete path. Use it as it is.
9642           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9643 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9644           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9645 $as_echo_n "checking for MKTEMP... " >&6; }
9646           if test ! -x "$tool_specified"; then
9647             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9648 $as_echo "not found" >&6; }
9649             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9650           fi
9651           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9652 $as_echo "$tool_specified" >&6; }
9653         fi
9654       fi
9655     fi
9656 
9657   fi
9658 
9659 
9660 
9661   if test "x$MKTEMP" = x; then
9662     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9663   fi
9664 
9665 
9666 
9667 
9668 
9669   # Publish this variable in the help.
9670 
9671 
9672   if [ -z "${MV+x}" ]; then
9673     # The variable is not set by user, try to locate tool using the code snippet
9674     for ac_prog in mv
9675 do
9676   # Extract the first word of "$ac_prog", so it can be a program name with args.
9677 set dummy $ac_prog; ac_word=$2
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9679 $as_echo_n "checking for $ac_word... " >&6; }
9680 if ${ac_cv_path_MV+:} false; then :
9681   $as_echo_n "(cached) " >&6
9682 else
9683   case $MV in
9684   [\\/]* | ?:[\\/]*)
9685   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9686   ;;
9687   *)
9688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9689 for as_dir in $PATH
9690 do
9691   IFS=$as_save_IFS
9692   test -z "$as_dir" && as_dir=.
9693     for ac_exec_ext in '' $ac_executable_extensions; do
9694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9695     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9697     break 2
9698   fi
9699 done
9700   done
9701 IFS=$as_save_IFS
9702 
9703   ;;
9704 esac
9705 fi
9706 MV=$ac_cv_path_MV
9707 if test -n "$MV"; then
9708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9709 $as_echo "$MV" >&6; }
9710 else
9711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712 $as_echo "no" >&6; }
9713 fi
9714 
9715 
9716   test -n "$MV" && break
9717 done
9718 
9719   else
9720     # The variable is set, but is it from the command line or the environment?
9721 
9722     # Try to remove the string !MV! from our list.
9723     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9724     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9725       # If it failed, the variable was not from the command line. Ignore it,
9726       # but warn the user (except for BASH, which is always set by the calling BASH).
9727       if test "xMV" != xBASH; then
9728         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9729 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9730       fi
9731       # Try to locate tool using the code snippet
9732       for ac_prog in mv
9733 do
9734   # Extract the first word of "$ac_prog", so it can be a program name with args.
9735 set dummy $ac_prog; ac_word=$2
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9737 $as_echo_n "checking for $ac_word... " >&6; }
9738 if ${ac_cv_path_MV+:} false; then :
9739   $as_echo_n "(cached) " >&6
9740 else
9741   case $MV in
9742   [\\/]* | ?:[\\/]*)
9743   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9744   ;;
9745   *)
9746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9747 for as_dir in $PATH
9748 do
9749   IFS=$as_save_IFS
9750   test -z "$as_dir" && as_dir=.
9751     for ac_exec_ext in '' $ac_executable_extensions; do
9752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9753     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9755     break 2
9756   fi
9757 done
9758   done
9759 IFS=$as_save_IFS
9760 
9761   ;;
9762 esac
9763 fi
9764 MV=$ac_cv_path_MV
9765 if test -n "$MV"; then
9766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9767 $as_echo "$MV" >&6; }
9768 else
9769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9770 $as_echo "no" >&6; }
9771 fi
9772 
9773 
9774   test -n "$MV" && break
9775 done
9776 
9777     else
9778       # If it succeeded, then it was overridden by the user. We will use it
9779       # for the tool.
9780 
9781       # First remove it from the list of overridden variables, so we can test
9782       # for unknown variables in the end.
9783       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9784 
9785       # Check if we try to supply an empty value
9786       if test "x$MV" = x; then
9787         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9788 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9789         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9790 $as_echo_n "checking for MV... " >&6; }
9791         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9792 $as_echo "disabled" >&6; }
9793       else
9794         # Check if the provided tool contains a complete path.
9795         tool_specified="$MV"
9796         tool_basename="${tool_specified##*/}"
9797         if test "x$tool_basename" = "x$tool_specified"; then
9798           # A command without a complete path is provided, search $PATH.
9799           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9800 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9801           # Extract the first word of "$tool_basename", so it can be a program name with args.
9802 set dummy $tool_basename; ac_word=$2
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9804 $as_echo_n "checking for $ac_word... " >&6; }
9805 if ${ac_cv_path_MV+:} false; then :
9806   $as_echo_n "(cached) " >&6
9807 else
9808   case $MV in
9809   [\\/]* | ?:[\\/]*)
9810   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9811   ;;
9812   *)
9813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9814 for as_dir in $PATH
9815 do
9816   IFS=$as_save_IFS
9817   test -z "$as_dir" && as_dir=.
9818     for ac_exec_ext in '' $ac_executable_extensions; do
9819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9820     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9822     break 2
9823   fi
9824 done
9825   done
9826 IFS=$as_save_IFS
9827 
9828   ;;
9829 esac
9830 fi
9831 MV=$ac_cv_path_MV
9832 if test -n "$MV"; then
9833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9834 $as_echo "$MV" >&6; }
9835 else
9836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9837 $as_echo "no" >&6; }
9838 fi
9839 
9840 
9841           if test "x$MV" = x; then
9842             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9843           fi
9844         else
9845           # Otherwise we believe it is a complete path. Use it as it is.
9846           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9847 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9848           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9849 $as_echo_n "checking for MV... " >&6; }
9850           if test ! -x "$tool_specified"; then
9851             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9852 $as_echo "not found" >&6; }
9853             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9854           fi
9855           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9856 $as_echo "$tool_specified" >&6; }
9857         fi
9858       fi
9859     fi
9860 
9861   fi
9862 
9863 
9864 
9865   if test "x$MV" = x; then
9866     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9867   fi
9868 
9869 
9870 
9871 
9872 
9873   # Publish this variable in the help.
9874 
9875 
9876   if [ -z "${NAWK+x}" ]; then
9877     # The variable is not set by user, try to locate tool using the code snippet
9878     for ac_prog in nawk gawk awk
9879 do
9880   # Extract the first word of "$ac_prog", so it can be a program name with args.
9881 set dummy $ac_prog; ac_word=$2
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9883 $as_echo_n "checking for $ac_word... " >&6; }
9884 if ${ac_cv_path_NAWK+:} false; then :
9885   $as_echo_n "(cached) " >&6
9886 else
9887   case $NAWK in
9888   [\\/]* | ?:[\\/]*)
9889   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9890   ;;
9891   *)
9892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9893 for as_dir in $PATH
9894 do
9895   IFS=$as_save_IFS
9896   test -z "$as_dir" && as_dir=.
9897     for ac_exec_ext in '' $ac_executable_extensions; do
9898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9899     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9901     break 2
9902   fi
9903 done
9904   done
9905 IFS=$as_save_IFS
9906 
9907   ;;
9908 esac
9909 fi
9910 NAWK=$ac_cv_path_NAWK
9911 if test -n "$NAWK"; then
9912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9913 $as_echo "$NAWK" >&6; }
9914 else
9915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9916 $as_echo "no" >&6; }
9917 fi
9918 
9919 
9920   test -n "$NAWK" && break
9921 done
9922 
9923   else
9924     # The variable is set, but is it from the command line or the environment?
9925 
9926     # Try to remove the string !NAWK! from our list.
9927     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9928     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9929       # If it failed, the variable was not from the command line. Ignore it,
9930       # but warn the user (except for BASH, which is always set by the calling BASH).
9931       if test "xNAWK" != xBASH; then
9932         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9933 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9934       fi
9935       # Try to locate tool using the code snippet
9936       for ac_prog in nawk gawk awk
9937 do
9938   # Extract the first word of "$ac_prog", so it can be a program name with args.
9939 set dummy $ac_prog; ac_word=$2
9940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9941 $as_echo_n "checking for $ac_word... " >&6; }
9942 if ${ac_cv_path_NAWK+:} false; then :
9943   $as_echo_n "(cached) " >&6
9944 else
9945   case $NAWK in
9946   [\\/]* | ?:[\\/]*)
9947   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9948   ;;
9949   *)
9950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9951 for as_dir in $PATH
9952 do
9953   IFS=$as_save_IFS
9954   test -z "$as_dir" && as_dir=.
9955     for ac_exec_ext in '' $ac_executable_extensions; do
9956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9957     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9959     break 2
9960   fi
9961 done
9962   done
9963 IFS=$as_save_IFS
9964 
9965   ;;
9966 esac
9967 fi
9968 NAWK=$ac_cv_path_NAWK
9969 if test -n "$NAWK"; then
9970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9971 $as_echo "$NAWK" >&6; }
9972 else
9973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9974 $as_echo "no" >&6; }
9975 fi
9976 
9977 
9978   test -n "$NAWK" && break
9979 done
9980 
9981     else
9982       # If it succeeded, then it was overridden by the user. We will use it
9983       # for the tool.
9984 
9985       # First remove it from the list of overridden variables, so we can test
9986       # for unknown variables in the end.
9987       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9988 
9989       # Check if we try to supply an empty value
9990       if test "x$NAWK" = x; then
9991         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9992 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9993         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9994 $as_echo_n "checking for NAWK... " >&6; }
9995         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9996 $as_echo "disabled" >&6; }
9997       else
9998         # Check if the provided tool contains a complete path.
9999         tool_specified="$NAWK"
10000         tool_basename="${tool_specified##*/}"
10001         if test "x$tool_basename" = "x$tool_specified"; then
10002           # A command without a complete path is provided, search $PATH.
10003           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10004 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10005           # Extract the first word of "$tool_basename", so it can be a program name with args.
10006 set dummy $tool_basename; ac_word=$2
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10008 $as_echo_n "checking for $ac_word... " >&6; }
10009 if ${ac_cv_path_NAWK+:} false; then :
10010   $as_echo_n "(cached) " >&6
10011 else
10012   case $NAWK in
10013   [\\/]* | ?:[\\/]*)
10014   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10015   ;;
10016   *)
10017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10018 for as_dir in $PATH
10019 do
10020   IFS=$as_save_IFS
10021   test -z "$as_dir" && as_dir=.
10022     for ac_exec_ext in '' $ac_executable_extensions; do
10023   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10024     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10026     break 2
10027   fi
10028 done
10029   done
10030 IFS=$as_save_IFS
10031 
10032   ;;
10033 esac
10034 fi
10035 NAWK=$ac_cv_path_NAWK
10036 if test -n "$NAWK"; then
10037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10038 $as_echo "$NAWK" >&6; }
10039 else
10040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10041 $as_echo "no" >&6; }
10042 fi
10043 
10044 
10045           if test "x$NAWK" = x; then
10046             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10047           fi
10048         else
10049           # Otherwise we believe it is a complete path. Use it as it is.
10050           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10051 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10052           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10053 $as_echo_n "checking for NAWK... " >&6; }
10054           if test ! -x "$tool_specified"; then
10055             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10056 $as_echo "not found" >&6; }
10057             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10058           fi
10059           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10060 $as_echo "$tool_specified" >&6; }
10061         fi
10062       fi
10063     fi
10064 
10065   fi
10066 
10067 
10068 
10069   if test "x$NAWK" = x; then
10070     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10071   fi
10072 
10073 
10074 
10075 
10076 
10077   # Publish this variable in the help.
10078 
10079 
10080   if [ -z "${PRINTF+x}" ]; then
10081     # The variable is not set by user, try to locate tool using the code snippet
10082     for ac_prog in printf
10083 do
10084   # Extract the first word of "$ac_prog", so it can be a program name with args.
10085 set dummy $ac_prog; ac_word=$2
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087 $as_echo_n "checking for $ac_word... " >&6; }
10088 if ${ac_cv_path_PRINTF+:} false; then :
10089   $as_echo_n "(cached) " >&6
10090 else
10091   case $PRINTF in
10092   [\\/]* | ?:[\\/]*)
10093   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10094   ;;
10095   *)
10096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10097 for as_dir in $PATH
10098 do
10099   IFS=$as_save_IFS
10100   test -z "$as_dir" && as_dir=.
10101     for ac_exec_ext in '' $ac_executable_extensions; do
10102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10103     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10105     break 2
10106   fi
10107 done
10108   done
10109 IFS=$as_save_IFS
10110 
10111   ;;
10112 esac
10113 fi
10114 PRINTF=$ac_cv_path_PRINTF
10115 if test -n "$PRINTF"; then
10116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10117 $as_echo "$PRINTF" >&6; }
10118 else
10119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120 $as_echo "no" >&6; }
10121 fi
10122 
10123 
10124   test -n "$PRINTF" && break
10125 done
10126 
10127   else
10128     # The variable is set, but is it from the command line or the environment?
10129 
10130     # Try to remove the string !PRINTF! from our list.
10131     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10132     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10133       # If it failed, the variable was not from the command line. Ignore it,
10134       # but warn the user (except for BASH, which is always set by the calling BASH).
10135       if test "xPRINTF" != xBASH; then
10136         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10137 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10138       fi
10139       # Try to locate tool using the code snippet
10140       for ac_prog in printf
10141 do
10142   # Extract the first word of "$ac_prog", so it can be a program name with args.
10143 set dummy $ac_prog; ac_word=$2
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10145 $as_echo_n "checking for $ac_word... " >&6; }
10146 if ${ac_cv_path_PRINTF+:} false; then :
10147   $as_echo_n "(cached) " >&6
10148 else
10149   case $PRINTF in
10150   [\\/]* | ?:[\\/]*)
10151   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10152   ;;
10153   *)
10154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10155 for as_dir in $PATH
10156 do
10157   IFS=$as_save_IFS
10158   test -z "$as_dir" && as_dir=.
10159     for ac_exec_ext in '' $ac_executable_extensions; do
10160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10161     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10163     break 2
10164   fi
10165 done
10166   done
10167 IFS=$as_save_IFS
10168 
10169   ;;
10170 esac
10171 fi
10172 PRINTF=$ac_cv_path_PRINTF
10173 if test -n "$PRINTF"; then
10174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10175 $as_echo "$PRINTF" >&6; }
10176 else
10177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178 $as_echo "no" >&6; }
10179 fi
10180 
10181 
10182   test -n "$PRINTF" && break
10183 done
10184 
10185     else
10186       # If it succeeded, then it was overridden by the user. We will use it
10187       # for the tool.
10188 
10189       # First remove it from the list of overridden variables, so we can test
10190       # for unknown variables in the end.
10191       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10192 
10193       # Check if we try to supply an empty value
10194       if test "x$PRINTF" = x; then
10195         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10196 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10197         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10198 $as_echo_n "checking for PRINTF... " >&6; }
10199         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10200 $as_echo "disabled" >&6; }
10201       else
10202         # Check if the provided tool contains a complete path.
10203         tool_specified="$PRINTF"
10204         tool_basename="${tool_specified##*/}"
10205         if test "x$tool_basename" = "x$tool_specified"; then
10206           # A command without a complete path is provided, search $PATH.
10207           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10208 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10209           # Extract the first word of "$tool_basename", so it can be a program name with args.
10210 set dummy $tool_basename; ac_word=$2
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10212 $as_echo_n "checking for $ac_word... " >&6; }
10213 if ${ac_cv_path_PRINTF+:} false; then :
10214   $as_echo_n "(cached) " >&6
10215 else
10216   case $PRINTF in
10217   [\\/]* | ?:[\\/]*)
10218   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10219   ;;
10220   *)
10221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10222 for as_dir in $PATH
10223 do
10224   IFS=$as_save_IFS
10225   test -z "$as_dir" && as_dir=.
10226     for ac_exec_ext in '' $ac_executable_extensions; do
10227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10228     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10230     break 2
10231   fi
10232 done
10233   done
10234 IFS=$as_save_IFS
10235 
10236   ;;
10237 esac
10238 fi
10239 PRINTF=$ac_cv_path_PRINTF
10240 if test -n "$PRINTF"; then
10241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10242 $as_echo "$PRINTF" >&6; }
10243 else
10244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10245 $as_echo "no" >&6; }
10246 fi
10247 
10248 
10249           if test "x$PRINTF" = x; then
10250             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10251           fi
10252         else
10253           # Otherwise we believe it is a complete path. Use it as it is.
10254           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10255 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10256           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10257 $as_echo_n "checking for PRINTF... " >&6; }
10258           if test ! -x "$tool_specified"; then
10259             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10260 $as_echo "not found" >&6; }
10261             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10262           fi
10263           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10264 $as_echo "$tool_specified" >&6; }
10265         fi
10266       fi
10267     fi
10268 
10269   fi
10270 
10271 
10272 
10273   if test "x$PRINTF" = x; then
10274     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10275   fi
10276 
10277 
10278 
10279 
10280 
10281   # Publish this variable in the help.
10282 
10283 
10284   if [ -z "${RM+x}" ]; then
10285     # The variable is not set by user, try to locate tool using the code snippet
10286     for ac_prog in rm
10287 do
10288   # Extract the first word of "$ac_prog", so it can be a program name with args.
10289 set dummy $ac_prog; ac_word=$2
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291 $as_echo_n "checking for $ac_word... " >&6; }
10292 if ${ac_cv_path_RM+:} false; then :
10293   $as_echo_n "(cached) " >&6
10294 else
10295   case $RM in
10296   [\\/]* | ?:[\\/]*)
10297   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10298   ;;
10299   *)
10300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301 for as_dir in $PATH
10302 do
10303   IFS=$as_save_IFS
10304   test -z "$as_dir" && as_dir=.
10305     for ac_exec_ext in '' $ac_executable_extensions; do
10306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10307     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309     break 2
10310   fi
10311 done
10312   done
10313 IFS=$as_save_IFS
10314 
10315   ;;
10316 esac
10317 fi
10318 RM=$ac_cv_path_RM
10319 if test -n "$RM"; then
10320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10321 $as_echo "$RM" >&6; }
10322 else
10323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324 $as_echo "no" >&6; }
10325 fi
10326 
10327 
10328   test -n "$RM" && break
10329 done
10330 
10331   else
10332     # The variable is set, but is it from the command line or the environment?
10333 
10334     # Try to remove the string !RM! from our list.
10335     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10336     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10337       # If it failed, the variable was not from the command line. Ignore it,
10338       # but warn the user (except for BASH, which is always set by the calling BASH).
10339       if test "xRM" != xBASH; then
10340         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10341 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10342       fi
10343       # Try to locate tool using the code snippet
10344       for ac_prog in rm
10345 do
10346   # Extract the first word of "$ac_prog", so it can be a program name with args.
10347 set dummy $ac_prog; ac_word=$2
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10349 $as_echo_n "checking for $ac_word... " >&6; }
10350 if ${ac_cv_path_RM+:} false; then :
10351   $as_echo_n "(cached) " >&6
10352 else
10353   case $RM in
10354   [\\/]* | ?:[\\/]*)
10355   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10356   ;;
10357   *)
10358   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10359 for as_dir in $PATH
10360 do
10361   IFS=$as_save_IFS
10362   test -z "$as_dir" && as_dir=.
10363     for ac_exec_ext in '' $ac_executable_extensions; do
10364   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10365     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10367     break 2
10368   fi
10369 done
10370   done
10371 IFS=$as_save_IFS
10372 
10373   ;;
10374 esac
10375 fi
10376 RM=$ac_cv_path_RM
10377 if test -n "$RM"; then
10378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10379 $as_echo "$RM" >&6; }
10380 else
10381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10382 $as_echo "no" >&6; }
10383 fi
10384 
10385 
10386   test -n "$RM" && break
10387 done
10388 
10389     else
10390       # If it succeeded, then it was overridden by the user. We will use it
10391       # for the tool.
10392 
10393       # First remove it from the list of overridden variables, so we can test
10394       # for unknown variables in the end.
10395       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10396 
10397       # Check if we try to supply an empty value
10398       if test "x$RM" = x; then
10399         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10400 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10401         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10402 $as_echo_n "checking for RM... " >&6; }
10403         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10404 $as_echo "disabled" >&6; }
10405       else
10406         # Check if the provided tool contains a complete path.
10407         tool_specified="$RM"
10408         tool_basename="${tool_specified##*/}"
10409         if test "x$tool_basename" = "x$tool_specified"; then
10410           # A command without a complete path is provided, search $PATH.
10411           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10412 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10413           # Extract the first word of "$tool_basename", so it can be a program name with args.
10414 set dummy $tool_basename; ac_word=$2
10415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10416 $as_echo_n "checking for $ac_word... " >&6; }
10417 if ${ac_cv_path_RM+:} false; then :
10418   $as_echo_n "(cached) " >&6
10419 else
10420   case $RM in
10421   [\\/]* | ?:[\\/]*)
10422   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10423   ;;
10424   *)
10425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10426 for as_dir in $PATH
10427 do
10428   IFS=$as_save_IFS
10429   test -z "$as_dir" && as_dir=.
10430     for ac_exec_ext in '' $ac_executable_extensions; do
10431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10432     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10434     break 2
10435   fi
10436 done
10437   done
10438 IFS=$as_save_IFS
10439 
10440   ;;
10441 esac
10442 fi
10443 RM=$ac_cv_path_RM
10444 if test -n "$RM"; then
10445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10446 $as_echo "$RM" >&6; }
10447 else
10448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10449 $as_echo "no" >&6; }
10450 fi
10451 
10452 
10453           if test "x$RM" = x; then
10454             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10455           fi
10456         else
10457           # Otherwise we believe it is a complete path. Use it as it is.
10458           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10459 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10460           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10461 $as_echo_n "checking for RM... " >&6; }
10462           if test ! -x "$tool_specified"; then
10463             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10464 $as_echo "not found" >&6; }
10465             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10466           fi
10467           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10468 $as_echo "$tool_specified" >&6; }
10469         fi
10470       fi
10471     fi
10472 
10473   fi
10474 
10475 
10476 
10477   if test "x$RM" = x; then
10478     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10479   fi
10480 
10481 
10482 
10483 
10484 
10485   # Publish this variable in the help.
10486 
10487 
10488   if [ -z "${RMDIR+x}" ]; then
10489     # The variable is not set by user, try to locate tool using the code snippet
10490     for ac_prog in rmdir
10491 do
10492   # Extract the first word of "$ac_prog", so it can be a program name with args.
10493 set dummy $ac_prog; ac_word=$2
10494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10495 $as_echo_n "checking for $ac_word... " >&6; }
10496 if ${ac_cv_path_RMDIR+:} false; then :
10497   $as_echo_n "(cached) " >&6
10498 else
10499   case $RMDIR in
10500   [\\/]* | ?:[\\/]*)
10501   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10502   ;;
10503   *)
10504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10505 for as_dir in $PATH
10506 do
10507   IFS=$as_save_IFS
10508   test -z "$as_dir" && as_dir=.
10509     for ac_exec_ext in '' $ac_executable_extensions; do
10510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10511     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10513     break 2
10514   fi
10515 done
10516   done
10517 IFS=$as_save_IFS
10518 
10519   ;;
10520 esac
10521 fi
10522 RMDIR=$ac_cv_path_RMDIR
10523 if test -n "$RMDIR"; then
10524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10525 $as_echo "$RMDIR" >&6; }
10526 else
10527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528 $as_echo "no" >&6; }
10529 fi
10530 
10531 
10532   test -n "$RMDIR" && break
10533 done
10534 
10535   else
10536     # The variable is set, but is it from the command line or the environment?
10537 
10538     # Try to remove the string !RMDIR! from our list.
10539     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10540     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10541       # If it failed, the variable was not from the command line. Ignore it,
10542       # but warn the user (except for BASH, which is always set by the calling BASH).
10543       if test "xRMDIR" != xBASH; then
10544         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10545 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10546       fi
10547       # Try to locate tool using the code snippet
10548       for ac_prog in rmdir
10549 do
10550   # Extract the first word of "$ac_prog", so it can be a program name with args.
10551 set dummy $ac_prog; ac_word=$2
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10553 $as_echo_n "checking for $ac_word... " >&6; }
10554 if ${ac_cv_path_RMDIR+:} false; then :
10555   $as_echo_n "(cached) " >&6
10556 else
10557   case $RMDIR in
10558   [\\/]* | ?:[\\/]*)
10559   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10560   ;;
10561   *)
10562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10563 for as_dir in $PATH
10564 do
10565   IFS=$as_save_IFS
10566   test -z "$as_dir" && as_dir=.
10567     for ac_exec_ext in '' $ac_executable_extensions; do
10568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10569     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10571     break 2
10572   fi
10573 done
10574   done
10575 IFS=$as_save_IFS
10576 
10577   ;;
10578 esac
10579 fi
10580 RMDIR=$ac_cv_path_RMDIR
10581 if test -n "$RMDIR"; then
10582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10583 $as_echo "$RMDIR" >&6; }
10584 else
10585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10586 $as_echo "no" >&6; }
10587 fi
10588 
10589 
10590   test -n "$RMDIR" && break
10591 done
10592 
10593     else
10594       # If it succeeded, then it was overridden by the user. We will use it
10595       # for the tool.
10596 
10597       # First remove it from the list of overridden variables, so we can test
10598       # for unknown variables in the end.
10599       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10600 
10601       # Check if we try to supply an empty value
10602       if test "x$RMDIR" = x; then
10603         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10604 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10605         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10606 $as_echo_n "checking for RMDIR... " >&6; }
10607         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10608 $as_echo "disabled" >&6; }
10609       else
10610         # Check if the provided tool contains a complete path.
10611         tool_specified="$RMDIR"
10612         tool_basename="${tool_specified##*/}"
10613         if test "x$tool_basename" = "x$tool_specified"; then
10614           # A command without a complete path is provided, search $PATH.
10615           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10616 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10617           # Extract the first word of "$tool_basename", so it can be a program name with args.
10618 set dummy $tool_basename; ac_word=$2
10619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10620 $as_echo_n "checking for $ac_word... " >&6; }
10621 if ${ac_cv_path_RMDIR+:} false; then :
10622   $as_echo_n "(cached) " >&6
10623 else
10624   case $RMDIR in
10625   [\\/]* | ?:[\\/]*)
10626   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10627   ;;
10628   *)
10629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10630 for as_dir in $PATH
10631 do
10632   IFS=$as_save_IFS
10633   test -z "$as_dir" && as_dir=.
10634     for ac_exec_ext in '' $ac_executable_extensions; do
10635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10636     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10638     break 2
10639   fi
10640 done
10641   done
10642 IFS=$as_save_IFS
10643 
10644   ;;
10645 esac
10646 fi
10647 RMDIR=$ac_cv_path_RMDIR
10648 if test -n "$RMDIR"; then
10649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10650 $as_echo "$RMDIR" >&6; }
10651 else
10652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10653 $as_echo "no" >&6; }
10654 fi
10655 
10656 
10657           if test "x$RMDIR" = x; then
10658             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10659           fi
10660         else
10661           # Otherwise we believe it is a complete path. Use it as it is.
10662           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10663 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10664           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10665 $as_echo_n "checking for RMDIR... " >&6; }
10666           if test ! -x "$tool_specified"; then
10667             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10668 $as_echo "not found" >&6; }
10669             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10670           fi
10671           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10672 $as_echo "$tool_specified" >&6; }
10673         fi
10674       fi
10675     fi
10676 
10677   fi
10678 
10679 
10680 
10681   if test "x$RMDIR" = x; then
10682     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10683   fi
10684 
10685 
10686 
10687 
10688 
10689   # Publish this variable in the help.
10690 
10691 
10692   if [ -z "${SH+x}" ]; then
10693     # The variable is not set by user, try to locate tool using the code snippet
10694     for ac_prog in sh
10695 do
10696   # Extract the first word of "$ac_prog", so it can be a program name with args.
10697 set dummy $ac_prog; ac_word=$2
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10699 $as_echo_n "checking for $ac_word... " >&6; }
10700 if ${ac_cv_path_SH+:} false; then :
10701   $as_echo_n "(cached) " >&6
10702 else
10703   case $SH in
10704   [\\/]* | ?:[\\/]*)
10705   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10706   ;;
10707   *)
10708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10709 for as_dir in $PATH
10710 do
10711   IFS=$as_save_IFS
10712   test -z "$as_dir" && as_dir=.
10713     for ac_exec_ext in '' $ac_executable_extensions; do
10714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10715     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10717     break 2
10718   fi
10719 done
10720   done
10721 IFS=$as_save_IFS
10722 
10723   ;;
10724 esac
10725 fi
10726 SH=$ac_cv_path_SH
10727 if test -n "$SH"; then
10728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10729 $as_echo "$SH" >&6; }
10730 else
10731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10732 $as_echo "no" >&6; }
10733 fi
10734 
10735 
10736   test -n "$SH" && break
10737 done
10738 
10739   else
10740     # The variable is set, but is it from the command line or the environment?
10741 
10742     # Try to remove the string !SH! from our list.
10743     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10744     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10745       # If it failed, the variable was not from the command line. Ignore it,
10746       # but warn the user (except for BASH, which is always set by the calling BASH).
10747       if test "xSH" != xBASH; then
10748         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10749 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10750       fi
10751       # Try to locate tool using the code snippet
10752       for ac_prog in sh
10753 do
10754   # Extract the first word of "$ac_prog", so it can be a program name with args.
10755 set dummy $ac_prog; ac_word=$2
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10757 $as_echo_n "checking for $ac_word... " >&6; }
10758 if ${ac_cv_path_SH+:} false; then :
10759   $as_echo_n "(cached) " >&6
10760 else
10761   case $SH in
10762   [\\/]* | ?:[\\/]*)
10763   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10764   ;;
10765   *)
10766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10767 for as_dir in $PATH
10768 do
10769   IFS=$as_save_IFS
10770   test -z "$as_dir" && as_dir=.
10771     for ac_exec_ext in '' $ac_executable_extensions; do
10772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10773     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10775     break 2
10776   fi
10777 done
10778   done
10779 IFS=$as_save_IFS
10780 
10781   ;;
10782 esac
10783 fi
10784 SH=$ac_cv_path_SH
10785 if test -n "$SH"; then
10786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10787 $as_echo "$SH" >&6; }
10788 else
10789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790 $as_echo "no" >&6; }
10791 fi
10792 
10793 
10794   test -n "$SH" && break
10795 done
10796 
10797     else
10798       # If it succeeded, then it was overridden by the user. We will use it
10799       # for the tool.
10800 
10801       # First remove it from the list of overridden variables, so we can test
10802       # for unknown variables in the end.
10803       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10804 
10805       # Check if we try to supply an empty value
10806       if test "x$SH" = x; then
10807         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10808 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10809         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10810 $as_echo_n "checking for SH... " >&6; }
10811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10812 $as_echo "disabled" >&6; }
10813       else
10814         # Check if the provided tool contains a complete path.
10815         tool_specified="$SH"
10816         tool_basename="${tool_specified##*/}"
10817         if test "x$tool_basename" = "x$tool_specified"; then
10818           # A command without a complete path is provided, search $PATH.
10819           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10820 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10821           # Extract the first word of "$tool_basename", so it can be a program name with args.
10822 set dummy $tool_basename; ac_word=$2
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10824 $as_echo_n "checking for $ac_word... " >&6; }
10825 if ${ac_cv_path_SH+:} false; then :
10826   $as_echo_n "(cached) " >&6
10827 else
10828   case $SH in
10829   [\\/]* | ?:[\\/]*)
10830   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10831   ;;
10832   *)
10833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10834 for as_dir in $PATH
10835 do
10836   IFS=$as_save_IFS
10837   test -z "$as_dir" && as_dir=.
10838     for ac_exec_ext in '' $ac_executable_extensions; do
10839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10840     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10842     break 2
10843   fi
10844 done
10845   done
10846 IFS=$as_save_IFS
10847 
10848   ;;
10849 esac
10850 fi
10851 SH=$ac_cv_path_SH
10852 if test -n "$SH"; then
10853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10854 $as_echo "$SH" >&6; }
10855 else
10856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10857 $as_echo "no" >&6; }
10858 fi
10859 
10860 
10861           if test "x$SH" = x; then
10862             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10863           fi
10864         else
10865           # Otherwise we believe it is a complete path. Use it as it is.
10866           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10867 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10868           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10869 $as_echo_n "checking for SH... " >&6; }
10870           if test ! -x "$tool_specified"; then
10871             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10872 $as_echo "not found" >&6; }
10873             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10874           fi
10875           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10876 $as_echo "$tool_specified" >&6; }
10877         fi
10878       fi
10879     fi
10880 
10881   fi
10882 
10883 
10884 
10885   if test "x$SH" = x; then
10886     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10887   fi
10888 
10889 
10890 
10891 
10892 
10893   # Publish this variable in the help.
10894 
10895 
10896   if [ -z "${SORT+x}" ]; then
10897     # The variable is not set by user, try to locate tool using the code snippet
10898     for ac_prog in sort
10899 do
10900   # Extract the first word of "$ac_prog", so it can be a program name with args.
10901 set dummy $ac_prog; ac_word=$2
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10903 $as_echo_n "checking for $ac_word... " >&6; }
10904 if ${ac_cv_path_SORT+:} false; then :
10905   $as_echo_n "(cached) " >&6
10906 else
10907   case $SORT in
10908   [\\/]* | ?:[\\/]*)
10909   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10910   ;;
10911   *)
10912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10913 for as_dir in $PATH
10914 do
10915   IFS=$as_save_IFS
10916   test -z "$as_dir" && as_dir=.
10917     for ac_exec_ext in '' $ac_executable_extensions; do
10918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10919     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10921     break 2
10922   fi
10923 done
10924   done
10925 IFS=$as_save_IFS
10926 
10927   ;;
10928 esac
10929 fi
10930 SORT=$ac_cv_path_SORT
10931 if test -n "$SORT"; then
10932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10933 $as_echo "$SORT" >&6; }
10934 else
10935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936 $as_echo "no" >&6; }
10937 fi
10938 
10939 
10940   test -n "$SORT" && break
10941 done
10942 
10943   else
10944     # The variable is set, but is it from the command line or the environment?
10945 
10946     # Try to remove the string !SORT! from our list.
10947     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10948     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10949       # If it failed, the variable was not from the command line. Ignore it,
10950       # but warn the user (except for BASH, which is always set by the calling BASH).
10951       if test "xSORT" != xBASH; then
10952         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10953 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10954       fi
10955       # Try to locate tool using the code snippet
10956       for ac_prog in sort
10957 do
10958   # Extract the first word of "$ac_prog", so it can be a program name with args.
10959 set dummy $ac_prog; ac_word=$2
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10961 $as_echo_n "checking for $ac_word... " >&6; }
10962 if ${ac_cv_path_SORT+:} false; then :
10963   $as_echo_n "(cached) " >&6
10964 else
10965   case $SORT in
10966   [\\/]* | ?:[\\/]*)
10967   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10968   ;;
10969   *)
10970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10971 for as_dir in $PATH
10972 do
10973   IFS=$as_save_IFS
10974   test -z "$as_dir" && as_dir=.
10975     for ac_exec_ext in '' $ac_executable_extensions; do
10976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10977     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10979     break 2
10980   fi
10981 done
10982   done
10983 IFS=$as_save_IFS
10984 
10985   ;;
10986 esac
10987 fi
10988 SORT=$ac_cv_path_SORT
10989 if test -n "$SORT"; then
10990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10991 $as_echo "$SORT" >&6; }
10992 else
10993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994 $as_echo "no" >&6; }
10995 fi
10996 
10997 
10998   test -n "$SORT" && break
10999 done
11000 
11001     else
11002       # If it succeeded, then it was overridden by the user. We will use it
11003       # for the tool.
11004 
11005       # First remove it from the list of overridden variables, so we can test
11006       # for unknown variables in the end.
11007       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11008 
11009       # Check if we try to supply an empty value
11010       if test "x$SORT" = x; then
11011         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11012 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11013         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11014 $as_echo_n "checking for SORT... " >&6; }
11015         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11016 $as_echo "disabled" >&6; }
11017       else
11018         # Check if the provided tool contains a complete path.
11019         tool_specified="$SORT"
11020         tool_basename="${tool_specified##*/}"
11021         if test "x$tool_basename" = "x$tool_specified"; then
11022           # A command without a complete path is provided, search $PATH.
11023           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11024 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11025           # Extract the first word of "$tool_basename", so it can be a program name with args.
11026 set dummy $tool_basename; ac_word=$2
11027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11028 $as_echo_n "checking for $ac_word... " >&6; }
11029 if ${ac_cv_path_SORT+:} false; then :
11030   $as_echo_n "(cached) " >&6
11031 else
11032   case $SORT in
11033   [\\/]* | ?:[\\/]*)
11034   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11035   ;;
11036   *)
11037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11038 for as_dir in $PATH
11039 do
11040   IFS=$as_save_IFS
11041   test -z "$as_dir" && as_dir=.
11042     for ac_exec_ext in '' $ac_executable_extensions; do
11043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11044     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11046     break 2
11047   fi
11048 done
11049   done
11050 IFS=$as_save_IFS
11051 
11052   ;;
11053 esac
11054 fi
11055 SORT=$ac_cv_path_SORT
11056 if test -n "$SORT"; then
11057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11058 $as_echo "$SORT" >&6; }
11059 else
11060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11061 $as_echo "no" >&6; }
11062 fi
11063 
11064 
11065           if test "x$SORT" = x; then
11066             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11067           fi
11068         else
11069           # Otherwise we believe it is a complete path. Use it as it is.
11070           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11071 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11072           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11073 $as_echo_n "checking for SORT... " >&6; }
11074           if test ! -x "$tool_specified"; then
11075             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11076 $as_echo "not found" >&6; }
11077             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11078           fi
11079           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11080 $as_echo "$tool_specified" >&6; }
11081         fi
11082       fi
11083     fi
11084 
11085   fi
11086 
11087 
11088 
11089   if test "x$SORT" = x; then
11090     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11091   fi
11092 
11093 
11094 
11095 
11096 
11097   # Publish this variable in the help.
11098 
11099 
11100   if [ -z "${TAIL+x}" ]; then
11101     # The variable is not set by user, try to locate tool using the code snippet
11102     for ac_prog in tail
11103 do
11104   # Extract the first word of "$ac_prog", so it can be a program name with args.
11105 set dummy $ac_prog; ac_word=$2
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11107 $as_echo_n "checking for $ac_word... " >&6; }
11108 if ${ac_cv_path_TAIL+:} false; then :
11109   $as_echo_n "(cached) " >&6
11110 else
11111   case $TAIL in
11112   [\\/]* | ?:[\\/]*)
11113   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11114   ;;
11115   *)
11116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11117 for as_dir in $PATH
11118 do
11119   IFS=$as_save_IFS
11120   test -z "$as_dir" && as_dir=.
11121     for ac_exec_ext in '' $ac_executable_extensions; do
11122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11123     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11125     break 2
11126   fi
11127 done
11128   done
11129 IFS=$as_save_IFS
11130 
11131   ;;
11132 esac
11133 fi
11134 TAIL=$ac_cv_path_TAIL
11135 if test -n "$TAIL"; then
11136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11137 $as_echo "$TAIL" >&6; }
11138 else
11139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140 $as_echo "no" >&6; }
11141 fi
11142 
11143 
11144   test -n "$TAIL" && break
11145 done
11146 
11147   else
11148     # The variable is set, but is it from the command line or the environment?
11149 
11150     # Try to remove the string !TAIL! from our list.
11151     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11152     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11153       # If it failed, the variable was not from the command line. Ignore it,
11154       # but warn the user (except for BASH, which is always set by the calling BASH).
11155       if test "xTAIL" != xBASH; then
11156         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11157 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11158       fi
11159       # Try to locate tool using the code snippet
11160       for ac_prog in tail
11161 do
11162   # Extract the first word of "$ac_prog", so it can be a program name with args.
11163 set dummy $ac_prog; ac_word=$2
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11165 $as_echo_n "checking for $ac_word... " >&6; }
11166 if ${ac_cv_path_TAIL+:} false; then :
11167   $as_echo_n "(cached) " >&6
11168 else
11169   case $TAIL in
11170   [\\/]* | ?:[\\/]*)
11171   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11172   ;;
11173   *)
11174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11175 for as_dir in $PATH
11176 do
11177   IFS=$as_save_IFS
11178   test -z "$as_dir" && as_dir=.
11179     for ac_exec_ext in '' $ac_executable_extensions; do
11180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11181     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11183     break 2
11184   fi
11185 done
11186   done
11187 IFS=$as_save_IFS
11188 
11189   ;;
11190 esac
11191 fi
11192 TAIL=$ac_cv_path_TAIL
11193 if test -n "$TAIL"; then
11194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11195 $as_echo "$TAIL" >&6; }
11196 else
11197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11198 $as_echo "no" >&6; }
11199 fi
11200 
11201 
11202   test -n "$TAIL" && break
11203 done
11204 
11205     else
11206       # If it succeeded, then it was overridden by the user. We will use it
11207       # for the tool.
11208 
11209       # First remove it from the list of overridden variables, so we can test
11210       # for unknown variables in the end.
11211       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11212 
11213       # Check if we try to supply an empty value
11214       if test "x$TAIL" = x; then
11215         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11216 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11218 $as_echo_n "checking for TAIL... " >&6; }
11219         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11220 $as_echo "disabled" >&6; }
11221       else
11222         # Check if the provided tool contains a complete path.
11223         tool_specified="$TAIL"
11224         tool_basename="${tool_specified##*/}"
11225         if test "x$tool_basename" = "x$tool_specified"; then
11226           # A command without a complete path is provided, search $PATH.
11227           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11228 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11229           # Extract the first word of "$tool_basename", so it can be a program name with args.
11230 set dummy $tool_basename; ac_word=$2
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11232 $as_echo_n "checking for $ac_word... " >&6; }
11233 if ${ac_cv_path_TAIL+:} false; then :
11234   $as_echo_n "(cached) " >&6
11235 else
11236   case $TAIL in
11237   [\\/]* | ?:[\\/]*)
11238   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11239   ;;
11240   *)
11241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11242 for as_dir in $PATH
11243 do
11244   IFS=$as_save_IFS
11245   test -z "$as_dir" && as_dir=.
11246     for ac_exec_ext in '' $ac_executable_extensions; do
11247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11248     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11250     break 2
11251   fi
11252 done
11253   done
11254 IFS=$as_save_IFS
11255 
11256   ;;
11257 esac
11258 fi
11259 TAIL=$ac_cv_path_TAIL
11260 if test -n "$TAIL"; then
11261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11262 $as_echo "$TAIL" >&6; }
11263 else
11264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11265 $as_echo "no" >&6; }
11266 fi
11267 
11268 
11269           if test "x$TAIL" = x; then
11270             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11271           fi
11272         else
11273           # Otherwise we believe it is a complete path. Use it as it is.
11274           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11275 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11276           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11277 $as_echo_n "checking for TAIL... " >&6; }
11278           if test ! -x "$tool_specified"; then
11279             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11280 $as_echo "not found" >&6; }
11281             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11282           fi
11283           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11284 $as_echo "$tool_specified" >&6; }
11285         fi
11286       fi
11287     fi
11288 
11289   fi
11290 
11291 
11292 
11293   if test "x$TAIL" = x; then
11294     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11295   fi
11296 
11297 
11298 
11299 
11300 
11301   # Publish this variable in the help.
11302 
11303 
11304   if [ -z "${TAR+x}" ]; then
11305     # The variable is not set by user, try to locate tool using the code snippet
11306     for ac_prog in gtar tar
11307 do
11308   # Extract the first word of "$ac_prog", so it can be a program name with args.
11309 set dummy $ac_prog; ac_word=$2
11310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11311 $as_echo_n "checking for $ac_word... " >&6; }
11312 if ${ac_cv_path_TAR+:} false; then :
11313   $as_echo_n "(cached) " >&6
11314 else
11315   case $TAR in
11316   [\\/]* | ?:[\\/]*)
11317   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11318   ;;
11319   *)
11320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11321 for as_dir in $PATH
11322 do
11323   IFS=$as_save_IFS
11324   test -z "$as_dir" && as_dir=.
11325     for ac_exec_ext in '' $ac_executable_extensions; do
11326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11327     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11329     break 2
11330   fi
11331 done
11332   done
11333 IFS=$as_save_IFS
11334 
11335   ;;
11336 esac
11337 fi
11338 TAR=$ac_cv_path_TAR
11339 if test -n "$TAR"; then
11340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11341 $as_echo "$TAR" >&6; }
11342 else
11343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344 $as_echo "no" >&6; }
11345 fi
11346 
11347 
11348   test -n "$TAR" && break
11349 done
11350 
11351   else
11352     # The variable is set, but is it from the command line or the environment?
11353 
11354     # Try to remove the string !TAR! from our list.
11355     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11356     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11357       # If it failed, the variable was not from the command line. Ignore it,
11358       # but warn the user (except for BASH, which is always set by the calling BASH).
11359       if test "xTAR" != xBASH; then
11360         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11361 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11362       fi
11363       # Try to locate tool using the code snippet
11364       for ac_prog in gtar tar
11365 do
11366   # Extract the first word of "$ac_prog", so it can be a program name with args.
11367 set dummy $ac_prog; ac_word=$2
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11369 $as_echo_n "checking for $ac_word... " >&6; }
11370 if ${ac_cv_path_TAR+:} false; then :
11371   $as_echo_n "(cached) " >&6
11372 else
11373   case $TAR in
11374   [\\/]* | ?:[\\/]*)
11375   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11376   ;;
11377   *)
11378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11379 for as_dir in $PATH
11380 do
11381   IFS=$as_save_IFS
11382   test -z "$as_dir" && as_dir=.
11383     for ac_exec_ext in '' $ac_executable_extensions; do
11384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11385     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11387     break 2
11388   fi
11389 done
11390   done
11391 IFS=$as_save_IFS
11392 
11393   ;;
11394 esac
11395 fi
11396 TAR=$ac_cv_path_TAR
11397 if test -n "$TAR"; then
11398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11399 $as_echo "$TAR" >&6; }
11400 else
11401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402 $as_echo "no" >&6; }
11403 fi
11404 
11405 
11406   test -n "$TAR" && break
11407 done
11408 
11409     else
11410       # If it succeeded, then it was overridden by the user. We will use it
11411       # for the tool.
11412 
11413       # First remove it from the list of overridden variables, so we can test
11414       # for unknown variables in the end.
11415       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11416 
11417       # Check if we try to supply an empty value
11418       if test "x$TAR" = x; then
11419         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11420 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11421         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11422 $as_echo_n "checking for TAR... " >&6; }
11423         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11424 $as_echo "disabled" >&6; }
11425       else
11426         # Check if the provided tool contains a complete path.
11427         tool_specified="$TAR"
11428         tool_basename="${tool_specified##*/}"
11429         if test "x$tool_basename" = "x$tool_specified"; then
11430           # A command without a complete path is provided, search $PATH.
11431           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11432 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11433           # Extract the first word of "$tool_basename", so it can be a program name with args.
11434 set dummy $tool_basename; ac_word=$2
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11436 $as_echo_n "checking for $ac_word... " >&6; }
11437 if ${ac_cv_path_TAR+:} false; then :
11438   $as_echo_n "(cached) " >&6
11439 else
11440   case $TAR in
11441   [\\/]* | ?:[\\/]*)
11442   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11443   ;;
11444   *)
11445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11446 for as_dir in $PATH
11447 do
11448   IFS=$as_save_IFS
11449   test -z "$as_dir" && as_dir=.
11450     for ac_exec_ext in '' $ac_executable_extensions; do
11451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11452     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11454     break 2
11455   fi
11456 done
11457   done
11458 IFS=$as_save_IFS
11459 
11460   ;;
11461 esac
11462 fi
11463 TAR=$ac_cv_path_TAR
11464 if test -n "$TAR"; then
11465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11466 $as_echo "$TAR" >&6; }
11467 else
11468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469 $as_echo "no" >&6; }
11470 fi
11471 
11472 
11473           if test "x$TAR" = x; then
11474             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11475           fi
11476         else
11477           # Otherwise we believe it is a complete path. Use it as it is.
11478           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11479 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11480           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11481 $as_echo_n "checking for TAR... " >&6; }
11482           if test ! -x "$tool_specified"; then
11483             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11484 $as_echo "not found" >&6; }
11485             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11486           fi
11487           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11488 $as_echo "$tool_specified" >&6; }
11489         fi
11490       fi
11491     fi
11492 
11493   fi
11494 
11495 
11496 
11497   if test "x$TAR" = x; then
11498     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11499   fi
11500 
11501 
11502 
11503 
11504 
11505   # Publish this variable in the help.
11506 
11507 
11508   if [ -z "${TEE+x}" ]; then
11509     # The variable is not set by user, try to locate tool using the code snippet
11510     for ac_prog in tee
11511 do
11512   # Extract the first word of "$ac_prog", so it can be a program name with args.
11513 set dummy $ac_prog; ac_word=$2
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11515 $as_echo_n "checking for $ac_word... " >&6; }
11516 if ${ac_cv_path_TEE+:} false; then :
11517   $as_echo_n "(cached) " >&6
11518 else
11519   case $TEE in
11520   [\\/]* | ?:[\\/]*)
11521   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11522   ;;
11523   *)
11524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11525 for as_dir in $PATH
11526 do
11527   IFS=$as_save_IFS
11528   test -z "$as_dir" && as_dir=.
11529     for ac_exec_ext in '' $ac_executable_extensions; do
11530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11531     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11533     break 2
11534   fi
11535 done
11536   done
11537 IFS=$as_save_IFS
11538 
11539   ;;
11540 esac
11541 fi
11542 TEE=$ac_cv_path_TEE
11543 if test -n "$TEE"; then
11544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11545 $as_echo "$TEE" >&6; }
11546 else
11547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11548 $as_echo "no" >&6; }
11549 fi
11550 
11551 
11552   test -n "$TEE" && break
11553 done
11554 
11555   else
11556     # The variable is set, but is it from the command line or the environment?
11557 
11558     # Try to remove the string !TEE! from our list.
11559     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11560     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11561       # If it failed, the variable was not from the command line. Ignore it,
11562       # but warn the user (except for BASH, which is always set by the calling BASH).
11563       if test "xTEE" != xBASH; then
11564         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11565 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11566       fi
11567       # Try to locate tool using the code snippet
11568       for ac_prog in tee
11569 do
11570   # Extract the first word of "$ac_prog", so it can be a program name with args.
11571 set dummy $ac_prog; ac_word=$2
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11573 $as_echo_n "checking for $ac_word... " >&6; }
11574 if ${ac_cv_path_TEE+:} false; then :
11575   $as_echo_n "(cached) " >&6
11576 else
11577   case $TEE in
11578   [\\/]* | ?:[\\/]*)
11579   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11580   ;;
11581   *)
11582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11583 for as_dir in $PATH
11584 do
11585   IFS=$as_save_IFS
11586   test -z "$as_dir" && as_dir=.
11587     for ac_exec_ext in '' $ac_executable_extensions; do
11588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11589     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11591     break 2
11592   fi
11593 done
11594   done
11595 IFS=$as_save_IFS
11596 
11597   ;;
11598 esac
11599 fi
11600 TEE=$ac_cv_path_TEE
11601 if test -n "$TEE"; then
11602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11603 $as_echo "$TEE" >&6; }
11604 else
11605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11606 $as_echo "no" >&6; }
11607 fi
11608 
11609 
11610   test -n "$TEE" && break
11611 done
11612 
11613     else
11614       # If it succeeded, then it was overridden by the user. We will use it
11615       # for the tool.
11616 
11617       # First remove it from the list of overridden variables, so we can test
11618       # for unknown variables in the end.
11619       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11620 
11621       # Check if we try to supply an empty value
11622       if test "x$TEE" = x; then
11623         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11624 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11626 $as_echo_n "checking for TEE... " >&6; }
11627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11628 $as_echo "disabled" >&6; }
11629       else
11630         # Check if the provided tool contains a complete path.
11631         tool_specified="$TEE"
11632         tool_basename="${tool_specified##*/}"
11633         if test "x$tool_basename" = "x$tool_specified"; then
11634           # A command without a complete path is provided, search $PATH.
11635           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11636 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11637           # Extract the first word of "$tool_basename", so it can be a program name with args.
11638 set dummy $tool_basename; ac_word=$2
11639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11640 $as_echo_n "checking for $ac_word... " >&6; }
11641 if ${ac_cv_path_TEE+:} false; then :
11642   $as_echo_n "(cached) " >&6
11643 else
11644   case $TEE in
11645   [\\/]* | ?:[\\/]*)
11646   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11647   ;;
11648   *)
11649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11650 for as_dir in $PATH
11651 do
11652   IFS=$as_save_IFS
11653   test -z "$as_dir" && as_dir=.
11654     for ac_exec_ext in '' $ac_executable_extensions; do
11655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11656     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11658     break 2
11659   fi
11660 done
11661   done
11662 IFS=$as_save_IFS
11663 
11664   ;;
11665 esac
11666 fi
11667 TEE=$ac_cv_path_TEE
11668 if test -n "$TEE"; then
11669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11670 $as_echo "$TEE" >&6; }
11671 else
11672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11673 $as_echo "no" >&6; }
11674 fi
11675 
11676 
11677           if test "x$TEE" = x; then
11678             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11679           fi
11680         else
11681           # Otherwise we believe it is a complete path. Use it as it is.
11682           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11683 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11684           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11685 $as_echo_n "checking for TEE... " >&6; }
11686           if test ! -x "$tool_specified"; then
11687             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11688 $as_echo "not found" >&6; }
11689             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11690           fi
11691           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11692 $as_echo "$tool_specified" >&6; }
11693         fi
11694       fi
11695     fi
11696 
11697   fi
11698 
11699 
11700 
11701   if test "x$TEE" = x; then
11702     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11703   fi
11704 
11705 
11706 
11707 
11708 
11709   # Publish this variable in the help.
11710 
11711 
11712   if [ -z "${TOUCH+x}" ]; then
11713     # The variable is not set by user, try to locate tool using the code snippet
11714     for ac_prog in touch
11715 do
11716   # Extract the first word of "$ac_prog", so it can be a program name with args.
11717 set dummy $ac_prog; ac_word=$2
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11719 $as_echo_n "checking for $ac_word... " >&6; }
11720 if ${ac_cv_path_TOUCH+:} false; then :
11721   $as_echo_n "(cached) " >&6
11722 else
11723   case $TOUCH in
11724   [\\/]* | ?:[\\/]*)
11725   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11726   ;;
11727   *)
11728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11729 for as_dir in $PATH
11730 do
11731   IFS=$as_save_IFS
11732   test -z "$as_dir" && as_dir=.
11733     for ac_exec_ext in '' $ac_executable_extensions; do
11734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11735     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11737     break 2
11738   fi
11739 done
11740   done
11741 IFS=$as_save_IFS
11742 
11743   ;;
11744 esac
11745 fi
11746 TOUCH=$ac_cv_path_TOUCH
11747 if test -n "$TOUCH"; then
11748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11749 $as_echo "$TOUCH" >&6; }
11750 else
11751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11752 $as_echo "no" >&6; }
11753 fi
11754 
11755 
11756   test -n "$TOUCH" && break
11757 done
11758 
11759   else
11760     # The variable is set, but is it from the command line or the environment?
11761 
11762     # Try to remove the string !TOUCH! from our list.
11763     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11764     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11765       # If it failed, the variable was not from the command line. Ignore it,
11766       # but warn the user (except for BASH, which is always set by the calling BASH).
11767       if test "xTOUCH" != xBASH; then
11768         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11769 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11770       fi
11771       # Try to locate tool using the code snippet
11772       for ac_prog in touch
11773 do
11774   # Extract the first word of "$ac_prog", so it can be a program name with args.
11775 set dummy $ac_prog; ac_word=$2
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11777 $as_echo_n "checking for $ac_word... " >&6; }
11778 if ${ac_cv_path_TOUCH+:} false; then :
11779   $as_echo_n "(cached) " >&6
11780 else
11781   case $TOUCH in
11782   [\\/]* | ?:[\\/]*)
11783   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11784   ;;
11785   *)
11786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11787 for as_dir in $PATH
11788 do
11789   IFS=$as_save_IFS
11790   test -z "$as_dir" && as_dir=.
11791     for ac_exec_ext in '' $ac_executable_extensions; do
11792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11793     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11795     break 2
11796   fi
11797 done
11798   done
11799 IFS=$as_save_IFS
11800 
11801   ;;
11802 esac
11803 fi
11804 TOUCH=$ac_cv_path_TOUCH
11805 if test -n "$TOUCH"; then
11806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11807 $as_echo "$TOUCH" >&6; }
11808 else
11809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11810 $as_echo "no" >&6; }
11811 fi
11812 
11813 
11814   test -n "$TOUCH" && break
11815 done
11816 
11817     else
11818       # If it succeeded, then it was overridden by the user. We will use it
11819       # for the tool.
11820 
11821       # First remove it from the list of overridden variables, so we can test
11822       # for unknown variables in the end.
11823       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11824 
11825       # Check if we try to supply an empty value
11826       if test "x$TOUCH" = x; then
11827         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11828 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11829         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11830 $as_echo_n "checking for TOUCH... " >&6; }
11831         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11832 $as_echo "disabled" >&6; }
11833       else
11834         # Check if the provided tool contains a complete path.
11835         tool_specified="$TOUCH"
11836         tool_basename="${tool_specified##*/}"
11837         if test "x$tool_basename" = "x$tool_specified"; then
11838           # A command without a complete path is provided, search $PATH.
11839           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11840 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11841           # Extract the first word of "$tool_basename", so it can be a program name with args.
11842 set dummy $tool_basename; ac_word=$2
11843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11844 $as_echo_n "checking for $ac_word... " >&6; }
11845 if ${ac_cv_path_TOUCH+:} false; then :
11846   $as_echo_n "(cached) " >&6
11847 else
11848   case $TOUCH in
11849   [\\/]* | ?:[\\/]*)
11850   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11851   ;;
11852   *)
11853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11854 for as_dir in $PATH
11855 do
11856   IFS=$as_save_IFS
11857   test -z "$as_dir" && as_dir=.
11858     for ac_exec_ext in '' $ac_executable_extensions; do
11859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11860     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11862     break 2
11863   fi
11864 done
11865   done
11866 IFS=$as_save_IFS
11867 
11868   ;;
11869 esac
11870 fi
11871 TOUCH=$ac_cv_path_TOUCH
11872 if test -n "$TOUCH"; then
11873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11874 $as_echo "$TOUCH" >&6; }
11875 else
11876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11877 $as_echo "no" >&6; }
11878 fi
11879 
11880 
11881           if test "x$TOUCH" = x; then
11882             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11883           fi
11884         else
11885           # Otherwise we believe it is a complete path. Use it as it is.
11886           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11887 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11888           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11889 $as_echo_n "checking for TOUCH... " >&6; }
11890           if test ! -x "$tool_specified"; then
11891             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11892 $as_echo "not found" >&6; }
11893             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11894           fi
11895           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11896 $as_echo "$tool_specified" >&6; }
11897         fi
11898       fi
11899     fi
11900 
11901   fi
11902 
11903 
11904 
11905   if test "x$TOUCH" = x; then
11906     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11907   fi
11908 
11909 
11910 
11911 
11912 
11913   # Publish this variable in the help.
11914 
11915 
11916   if [ -z "${TR+x}" ]; then
11917     # The variable is not set by user, try to locate tool using the code snippet
11918     for ac_prog in tr
11919 do
11920   # Extract the first word of "$ac_prog", so it can be a program name with args.
11921 set dummy $ac_prog; ac_word=$2
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11923 $as_echo_n "checking for $ac_word... " >&6; }
11924 if ${ac_cv_path_TR+:} false; then :
11925   $as_echo_n "(cached) " >&6
11926 else
11927   case $TR in
11928   [\\/]* | ?:[\\/]*)
11929   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11930   ;;
11931   *)
11932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11933 for as_dir in $PATH
11934 do
11935   IFS=$as_save_IFS
11936   test -z "$as_dir" && as_dir=.
11937     for ac_exec_ext in '' $ac_executable_extensions; do
11938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11939     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11941     break 2
11942   fi
11943 done
11944   done
11945 IFS=$as_save_IFS
11946 
11947   ;;
11948 esac
11949 fi
11950 TR=$ac_cv_path_TR
11951 if test -n "$TR"; then
11952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11953 $as_echo "$TR" >&6; }
11954 else
11955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956 $as_echo "no" >&6; }
11957 fi
11958 
11959 
11960   test -n "$TR" && break
11961 done
11962 
11963   else
11964     # The variable is set, but is it from the command line or the environment?
11965 
11966     # Try to remove the string !TR! from our list.
11967     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11968     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11969       # If it failed, the variable was not from the command line. Ignore it,
11970       # but warn the user (except for BASH, which is always set by the calling BASH).
11971       if test "xTR" != xBASH; then
11972         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11973 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11974       fi
11975       # Try to locate tool using the code snippet
11976       for ac_prog in tr
11977 do
11978   # Extract the first word of "$ac_prog", so it can be a program name with args.
11979 set dummy $ac_prog; ac_word=$2
11980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11981 $as_echo_n "checking for $ac_word... " >&6; }
11982 if ${ac_cv_path_TR+:} false; then :
11983   $as_echo_n "(cached) " >&6
11984 else
11985   case $TR in
11986   [\\/]* | ?:[\\/]*)
11987   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11988   ;;
11989   *)
11990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11991 for as_dir in $PATH
11992 do
11993   IFS=$as_save_IFS
11994   test -z "$as_dir" && as_dir=.
11995     for ac_exec_ext in '' $ac_executable_extensions; do
11996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11997     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11999     break 2
12000   fi
12001 done
12002   done
12003 IFS=$as_save_IFS
12004 
12005   ;;
12006 esac
12007 fi
12008 TR=$ac_cv_path_TR
12009 if test -n "$TR"; then
12010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12011 $as_echo "$TR" >&6; }
12012 else
12013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12014 $as_echo "no" >&6; }
12015 fi
12016 
12017 
12018   test -n "$TR" && break
12019 done
12020 
12021     else
12022       # If it succeeded, then it was overridden by the user. We will use it
12023       # for the tool.
12024 
12025       # First remove it from the list of overridden variables, so we can test
12026       # for unknown variables in the end.
12027       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12028 
12029       # Check if we try to supply an empty value
12030       if test "x$TR" = x; then
12031         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12032 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12034 $as_echo_n "checking for TR... " >&6; }
12035         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12036 $as_echo "disabled" >&6; }
12037       else
12038         # Check if the provided tool contains a complete path.
12039         tool_specified="$TR"
12040         tool_basename="${tool_specified##*/}"
12041         if test "x$tool_basename" = "x$tool_specified"; then
12042           # A command without a complete path is provided, search $PATH.
12043           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12044 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12045           # Extract the first word of "$tool_basename", so it can be a program name with args.
12046 set dummy $tool_basename; ac_word=$2
12047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12048 $as_echo_n "checking for $ac_word... " >&6; }
12049 if ${ac_cv_path_TR+:} false; then :
12050   $as_echo_n "(cached) " >&6
12051 else
12052   case $TR in
12053   [\\/]* | ?:[\\/]*)
12054   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12055   ;;
12056   *)
12057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12058 for as_dir in $PATH
12059 do
12060   IFS=$as_save_IFS
12061   test -z "$as_dir" && as_dir=.
12062     for ac_exec_ext in '' $ac_executable_extensions; do
12063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12064     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12066     break 2
12067   fi
12068 done
12069   done
12070 IFS=$as_save_IFS
12071 
12072   ;;
12073 esac
12074 fi
12075 TR=$ac_cv_path_TR
12076 if test -n "$TR"; then
12077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12078 $as_echo "$TR" >&6; }
12079 else
12080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12081 $as_echo "no" >&6; }
12082 fi
12083 
12084 
12085           if test "x$TR" = x; then
12086             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12087           fi
12088         else
12089           # Otherwise we believe it is a complete path. Use it as it is.
12090           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12091 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12092           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12093 $as_echo_n "checking for TR... " >&6; }
12094           if test ! -x "$tool_specified"; then
12095             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12096 $as_echo "not found" >&6; }
12097             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12098           fi
12099           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12100 $as_echo "$tool_specified" >&6; }
12101         fi
12102       fi
12103     fi
12104 
12105   fi
12106 
12107 
12108 
12109   if test "x$TR" = x; then
12110     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12111   fi
12112 
12113 
12114 
12115 
12116 
12117   # Publish this variable in the help.
12118 
12119 
12120   if [ -z "${UNAME+x}" ]; then
12121     # The variable is not set by user, try to locate tool using the code snippet
12122     for ac_prog in uname
12123 do
12124   # Extract the first word of "$ac_prog", so it can be a program name with args.
12125 set dummy $ac_prog; ac_word=$2
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12127 $as_echo_n "checking for $ac_word... " >&6; }
12128 if ${ac_cv_path_UNAME+:} false; then :
12129   $as_echo_n "(cached) " >&6
12130 else
12131   case $UNAME in
12132   [\\/]* | ?:[\\/]*)
12133   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12134   ;;
12135   *)
12136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12137 for as_dir in $PATH
12138 do
12139   IFS=$as_save_IFS
12140   test -z "$as_dir" && as_dir=.
12141     for ac_exec_ext in '' $ac_executable_extensions; do
12142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12143     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12145     break 2
12146   fi
12147 done
12148   done
12149 IFS=$as_save_IFS
12150 
12151   ;;
12152 esac
12153 fi
12154 UNAME=$ac_cv_path_UNAME
12155 if test -n "$UNAME"; then
12156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12157 $as_echo "$UNAME" >&6; }
12158 else
12159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12160 $as_echo "no" >&6; }
12161 fi
12162 
12163 
12164   test -n "$UNAME" && break
12165 done
12166 
12167   else
12168     # The variable is set, but is it from the command line or the environment?
12169 
12170     # Try to remove the string !UNAME! from our list.
12171     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12172     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12173       # If it failed, the variable was not from the command line. Ignore it,
12174       # but warn the user (except for BASH, which is always set by the calling BASH).
12175       if test "xUNAME" != xBASH; then
12176         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12177 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12178       fi
12179       # Try to locate tool using the code snippet
12180       for ac_prog in uname
12181 do
12182   # Extract the first word of "$ac_prog", so it can be a program name with args.
12183 set dummy $ac_prog; ac_word=$2
12184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12185 $as_echo_n "checking for $ac_word... " >&6; }
12186 if ${ac_cv_path_UNAME+:} false; then :
12187   $as_echo_n "(cached) " >&6
12188 else
12189   case $UNAME in
12190   [\\/]* | ?:[\\/]*)
12191   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12192   ;;
12193   *)
12194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12195 for as_dir in $PATH
12196 do
12197   IFS=$as_save_IFS
12198   test -z "$as_dir" && as_dir=.
12199     for ac_exec_ext in '' $ac_executable_extensions; do
12200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12201     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12203     break 2
12204   fi
12205 done
12206   done
12207 IFS=$as_save_IFS
12208 
12209   ;;
12210 esac
12211 fi
12212 UNAME=$ac_cv_path_UNAME
12213 if test -n "$UNAME"; then
12214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12215 $as_echo "$UNAME" >&6; }
12216 else
12217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12218 $as_echo "no" >&6; }
12219 fi
12220 
12221 
12222   test -n "$UNAME" && break
12223 done
12224 
12225     else
12226       # If it succeeded, then it was overridden by the user. We will use it
12227       # for the tool.
12228 
12229       # First remove it from the list of overridden variables, so we can test
12230       # for unknown variables in the end.
12231       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12232 
12233       # Check if we try to supply an empty value
12234       if test "x$UNAME" = x; then
12235         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12236 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12237         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12238 $as_echo_n "checking for UNAME... " >&6; }
12239         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12240 $as_echo "disabled" >&6; }
12241       else
12242         # Check if the provided tool contains a complete path.
12243         tool_specified="$UNAME"
12244         tool_basename="${tool_specified##*/}"
12245         if test "x$tool_basename" = "x$tool_specified"; then
12246           # A command without a complete path is provided, search $PATH.
12247           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12248 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12249           # Extract the first word of "$tool_basename", so it can be a program name with args.
12250 set dummy $tool_basename; ac_word=$2
12251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12252 $as_echo_n "checking for $ac_word... " >&6; }
12253 if ${ac_cv_path_UNAME+:} false; then :
12254   $as_echo_n "(cached) " >&6
12255 else
12256   case $UNAME in
12257   [\\/]* | ?:[\\/]*)
12258   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12259   ;;
12260   *)
12261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12262 for as_dir in $PATH
12263 do
12264   IFS=$as_save_IFS
12265   test -z "$as_dir" && as_dir=.
12266     for ac_exec_ext in '' $ac_executable_extensions; do
12267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12268     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12270     break 2
12271   fi
12272 done
12273   done
12274 IFS=$as_save_IFS
12275 
12276   ;;
12277 esac
12278 fi
12279 UNAME=$ac_cv_path_UNAME
12280 if test -n "$UNAME"; then
12281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12282 $as_echo "$UNAME" >&6; }
12283 else
12284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12285 $as_echo "no" >&6; }
12286 fi
12287 
12288 
12289           if test "x$UNAME" = x; then
12290             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12291           fi
12292         else
12293           # Otherwise we believe it is a complete path. Use it as it is.
12294           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12295 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12296           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12297 $as_echo_n "checking for UNAME... " >&6; }
12298           if test ! -x "$tool_specified"; then
12299             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12300 $as_echo "not found" >&6; }
12301             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12302           fi
12303           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12304 $as_echo "$tool_specified" >&6; }
12305         fi
12306       fi
12307     fi
12308 
12309   fi
12310 
12311 
12312 
12313   if test "x$UNAME" = x; then
12314     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12315   fi
12316 
12317 
12318 
12319 
12320 
12321   # Publish this variable in the help.
12322 
12323 
12324   if [ -z "${UNIQ+x}" ]; then
12325     # The variable is not set by user, try to locate tool using the code snippet
12326     for ac_prog in uniq
12327 do
12328   # Extract the first word of "$ac_prog", so it can be a program name with args.
12329 set dummy $ac_prog; ac_word=$2
12330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12331 $as_echo_n "checking for $ac_word... " >&6; }
12332 if ${ac_cv_path_UNIQ+:} false; then :
12333   $as_echo_n "(cached) " >&6
12334 else
12335   case $UNIQ in
12336   [\\/]* | ?:[\\/]*)
12337   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12338   ;;
12339   *)
12340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12341 for as_dir in $PATH
12342 do
12343   IFS=$as_save_IFS
12344   test -z "$as_dir" && as_dir=.
12345     for ac_exec_ext in '' $ac_executable_extensions; do
12346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12347     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12349     break 2
12350   fi
12351 done
12352   done
12353 IFS=$as_save_IFS
12354 
12355   ;;
12356 esac
12357 fi
12358 UNIQ=$ac_cv_path_UNIQ
12359 if test -n "$UNIQ"; then
12360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12361 $as_echo "$UNIQ" >&6; }
12362 else
12363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12364 $as_echo "no" >&6; }
12365 fi
12366 
12367 
12368   test -n "$UNIQ" && break
12369 done
12370 
12371   else
12372     # The variable is set, but is it from the command line or the environment?
12373 
12374     # Try to remove the string !UNIQ! from our list.
12375     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12376     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12377       # If it failed, the variable was not from the command line. Ignore it,
12378       # but warn the user (except for BASH, which is always set by the calling BASH).
12379       if test "xUNIQ" != xBASH; then
12380         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12381 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12382       fi
12383       # Try to locate tool using the code snippet
12384       for ac_prog in uniq
12385 do
12386   # Extract the first word of "$ac_prog", so it can be a program name with args.
12387 set dummy $ac_prog; ac_word=$2
12388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12389 $as_echo_n "checking for $ac_word... " >&6; }
12390 if ${ac_cv_path_UNIQ+:} false; then :
12391   $as_echo_n "(cached) " >&6
12392 else
12393   case $UNIQ in
12394   [\\/]* | ?:[\\/]*)
12395   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12396   ;;
12397   *)
12398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12399 for as_dir in $PATH
12400 do
12401   IFS=$as_save_IFS
12402   test -z "$as_dir" && as_dir=.
12403     for ac_exec_ext in '' $ac_executable_extensions; do
12404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12405     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12407     break 2
12408   fi
12409 done
12410   done
12411 IFS=$as_save_IFS
12412 
12413   ;;
12414 esac
12415 fi
12416 UNIQ=$ac_cv_path_UNIQ
12417 if test -n "$UNIQ"; then
12418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12419 $as_echo "$UNIQ" >&6; }
12420 else
12421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12422 $as_echo "no" >&6; }
12423 fi
12424 
12425 
12426   test -n "$UNIQ" && break
12427 done
12428 
12429     else
12430       # If it succeeded, then it was overridden by the user. We will use it
12431       # for the tool.
12432 
12433       # First remove it from the list of overridden variables, so we can test
12434       # for unknown variables in the end.
12435       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12436 
12437       # Check if we try to supply an empty value
12438       if test "x$UNIQ" = x; then
12439         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12440 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12441         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12442 $as_echo_n "checking for UNIQ... " >&6; }
12443         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12444 $as_echo "disabled" >&6; }
12445       else
12446         # Check if the provided tool contains a complete path.
12447         tool_specified="$UNIQ"
12448         tool_basename="${tool_specified##*/}"
12449         if test "x$tool_basename" = "x$tool_specified"; then
12450           # A command without a complete path is provided, search $PATH.
12451           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12452 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12453           # Extract the first word of "$tool_basename", so it can be a program name with args.
12454 set dummy $tool_basename; ac_word=$2
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12456 $as_echo_n "checking for $ac_word... " >&6; }
12457 if ${ac_cv_path_UNIQ+:} false; then :
12458   $as_echo_n "(cached) " >&6
12459 else
12460   case $UNIQ in
12461   [\\/]* | ?:[\\/]*)
12462   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12463   ;;
12464   *)
12465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12466 for as_dir in $PATH
12467 do
12468   IFS=$as_save_IFS
12469   test -z "$as_dir" && as_dir=.
12470     for ac_exec_ext in '' $ac_executable_extensions; do
12471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12472     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12474     break 2
12475   fi
12476 done
12477   done
12478 IFS=$as_save_IFS
12479 
12480   ;;
12481 esac
12482 fi
12483 UNIQ=$ac_cv_path_UNIQ
12484 if test -n "$UNIQ"; then
12485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12486 $as_echo "$UNIQ" >&6; }
12487 else
12488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12489 $as_echo "no" >&6; }
12490 fi
12491 
12492 
12493           if test "x$UNIQ" = x; then
12494             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12495           fi
12496         else
12497           # Otherwise we believe it is a complete path. Use it as it is.
12498           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12499 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12500           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12501 $as_echo_n "checking for UNIQ... " >&6; }
12502           if test ! -x "$tool_specified"; then
12503             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12504 $as_echo "not found" >&6; }
12505             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12506           fi
12507           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12508 $as_echo "$tool_specified" >&6; }
12509         fi
12510       fi
12511     fi
12512 
12513   fi
12514 
12515 
12516 
12517   if test "x$UNIQ" = x; then
12518     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12519   fi
12520 
12521 
12522 
12523 
12524 
12525   # Publish this variable in the help.
12526 
12527 
12528   if [ -z "${WC+x}" ]; then
12529     # The variable is not set by user, try to locate tool using the code snippet
12530     for ac_prog in wc
12531 do
12532   # Extract the first word of "$ac_prog", so it can be a program name with args.
12533 set dummy $ac_prog; ac_word=$2
12534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12535 $as_echo_n "checking for $ac_word... " >&6; }
12536 if ${ac_cv_path_WC+:} false; then :
12537   $as_echo_n "(cached) " >&6
12538 else
12539   case $WC in
12540   [\\/]* | ?:[\\/]*)
12541   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12542   ;;
12543   *)
12544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12545 for as_dir in $PATH
12546 do
12547   IFS=$as_save_IFS
12548   test -z "$as_dir" && as_dir=.
12549     for ac_exec_ext in '' $ac_executable_extensions; do
12550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12551     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12553     break 2
12554   fi
12555 done
12556   done
12557 IFS=$as_save_IFS
12558 
12559   ;;
12560 esac
12561 fi
12562 WC=$ac_cv_path_WC
12563 if test -n "$WC"; then
12564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12565 $as_echo "$WC" >&6; }
12566 else
12567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12568 $as_echo "no" >&6; }
12569 fi
12570 
12571 
12572   test -n "$WC" && break
12573 done
12574 
12575   else
12576     # The variable is set, but is it from the command line or the environment?
12577 
12578     # Try to remove the string !WC! from our list.
12579     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12580     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12581       # If it failed, the variable was not from the command line. Ignore it,
12582       # but warn the user (except for BASH, which is always set by the calling BASH).
12583       if test "xWC" != xBASH; then
12584         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12585 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12586       fi
12587       # Try to locate tool using the code snippet
12588       for ac_prog in wc
12589 do
12590   # Extract the first word of "$ac_prog", so it can be a program name with args.
12591 set dummy $ac_prog; ac_word=$2
12592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12593 $as_echo_n "checking for $ac_word... " >&6; }
12594 if ${ac_cv_path_WC+:} false; then :
12595   $as_echo_n "(cached) " >&6
12596 else
12597   case $WC in
12598   [\\/]* | ?:[\\/]*)
12599   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12600   ;;
12601   *)
12602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12603 for as_dir in $PATH
12604 do
12605   IFS=$as_save_IFS
12606   test -z "$as_dir" && as_dir=.
12607     for ac_exec_ext in '' $ac_executable_extensions; do
12608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12609     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12611     break 2
12612   fi
12613 done
12614   done
12615 IFS=$as_save_IFS
12616 
12617   ;;
12618 esac
12619 fi
12620 WC=$ac_cv_path_WC
12621 if test -n "$WC"; then
12622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12623 $as_echo "$WC" >&6; }
12624 else
12625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12626 $as_echo "no" >&6; }
12627 fi
12628 
12629 
12630   test -n "$WC" && break
12631 done
12632 
12633     else
12634       # If it succeeded, then it was overridden by the user. We will use it
12635       # for the tool.
12636 
12637       # First remove it from the list of overridden variables, so we can test
12638       # for unknown variables in the end.
12639       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12640 
12641       # Check if we try to supply an empty value
12642       if test "x$WC" = x; then
12643         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12644 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12645         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12646 $as_echo_n "checking for WC... " >&6; }
12647         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12648 $as_echo "disabled" >&6; }
12649       else
12650         # Check if the provided tool contains a complete path.
12651         tool_specified="$WC"
12652         tool_basename="${tool_specified##*/}"
12653         if test "x$tool_basename" = "x$tool_specified"; then
12654           # A command without a complete path is provided, search $PATH.
12655           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12656 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12657           # Extract the first word of "$tool_basename", so it can be a program name with args.
12658 set dummy $tool_basename; ac_word=$2
12659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12660 $as_echo_n "checking for $ac_word... " >&6; }
12661 if ${ac_cv_path_WC+:} false; then :
12662   $as_echo_n "(cached) " >&6
12663 else
12664   case $WC in
12665   [\\/]* | ?:[\\/]*)
12666   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12667   ;;
12668   *)
12669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12670 for as_dir in $PATH
12671 do
12672   IFS=$as_save_IFS
12673   test -z "$as_dir" && as_dir=.
12674     for ac_exec_ext in '' $ac_executable_extensions; do
12675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12676     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12678     break 2
12679   fi
12680 done
12681   done
12682 IFS=$as_save_IFS
12683 
12684   ;;
12685 esac
12686 fi
12687 WC=$ac_cv_path_WC
12688 if test -n "$WC"; then
12689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12690 $as_echo "$WC" >&6; }
12691 else
12692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12693 $as_echo "no" >&6; }
12694 fi
12695 
12696 
12697           if test "x$WC" = x; then
12698             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12699           fi
12700         else
12701           # Otherwise we believe it is a complete path. Use it as it is.
12702           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12703 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12704           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12705 $as_echo_n "checking for WC... " >&6; }
12706           if test ! -x "$tool_specified"; then
12707             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12708 $as_echo "not found" >&6; }
12709             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12710           fi
12711           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12712 $as_echo "$tool_specified" >&6; }
12713         fi
12714       fi
12715     fi
12716 
12717   fi
12718 
12719 
12720 
12721   if test "x$WC" = x; then
12722     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12723   fi
12724 
12725 
12726 
12727 
12728 
12729   # Publish this variable in the help.
12730 
12731 
12732   if [ -z "${WHICH+x}" ]; then
12733     # The variable is not set by user, try to locate tool using the code snippet
12734     for ac_prog in which
12735 do
12736   # Extract the first word of "$ac_prog", so it can be a program name with args.
12737 set dummy $ac_prog; ac_word=$2
12738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12739 $as_echo_n "checking for $ac_word... " >&6; }
12740 if ${ac_cv_path_WHICH+:} false; then :
12741   $as_echo_n "(cached) " >&6
12742 else
12743   case $WHICH in
12744   [\\/]* | ?:[\\/]*)
12745   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12746   ;;
12747   *)
12748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12749 for as_dir in $PATH
12750 do
12751   IFS=$as_save_IFS
12752   test -z "$as_dir" && as_dir=.
12753     for ac_exec_ext in '' $ac_executable_extensions; do
12754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12755     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12757     break 2
12758   fi
12759 done
12760   done
12761 IFS=$as_save_IFS
12762 
12763   ;;
12764 esac
12765 fi
12766 WHICH=$ac_cv_path_WHICH
12767 if test -n "$WHICH"; then
12768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12769 $as_echo "$WHICH" >&6; }
12770 else
12771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12772 $as_echo "no" >&6; }
12773 fi
12774 
12775 
12776   test -n "$WHICH" && break
12777 done
12778 
12779   else
12780     # The variable is set, but is it from the command line or the environment?
12781 
12782     # Try to remove the string !WHICH! from our list.
12783     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12784     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12785       # If it failed, the variable was not from the command line. Ignore it,
12786       # but warn the user (except for BASH, which is always set by the calling BASH).
12787       if test "xWHICH" != xBASH; then
12788         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12789 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12790       fi
12791       # Try to locate tool using the code snippet
12792       for ac_prog in which
12793 do
12794   # Extract the first word of "$ac_prog", so it can be a program name with args.
12795 set dummy $ac_prog; ac_word=$2
12796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12797 $as_echo_n "checking for $ac_word... " >&6; }
12798 if ${ac_cv_path_WHICH+:} false; then :
12799   $as_echo_n "(cached) " >&6
12800 else
12801   case $WHICH in
12802   [\\/]* | ?:[\\/]*)
12803   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12804   ;;
12805   *)
12806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12807 for as_dir in $PATH
12808 do
12809   IFS=$as_save_IFS
12810   test -z "$as_dir" && as_dir=.
12811     for ac_exec_ext in '' $ac_executable_extensions; do
12812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12813     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12815     break 2
12816   fi
12817 done
12818   done
12819 IFS=$as_save_IFS
12820 
12821   ;;
12822 esac
12823 fi
12824 WHICH=$ac_cv_path_WHICH
12825 if test -n "$WHICH"; then
12826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12827 $as_echo "$WHICH" >&6; }
12828 else
12829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12830 $as_echo "no" >&6; }
12831 fi
12832 
12833 
12834   test -n "$WHICH" && break
12835 done
12836 
12837     else
12838       # If it succeeded, then it was overridden by the user. We will use it
12839       # for the tool.
12840 
12841       # First remove it from the list of overridden variables, so we can test
12842       # for unknown variables in the end.
12843       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12844 
12845       # Check if we try to supply an empty value
12846       if test "x$WHICH" = x; then
12847         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12848 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12849         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12850 $as_echo_n "checking for WHICH... " >&6; }
12851         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12852 $as_echo "disabled" >&6; }
12853       else
12854         # Check if the provided tool contains a complete path.
12855         tool_specified="$WHICH"
12856         tool_basename="${tool_specified##*/}"
12857         if test "x$tool_basename" = "x$tool_specified"; then
12858           # A command without a complete path is provided, search $PATH.
12859           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12860 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12861           # Extract the first word of "$tool_basename", so it can be a program name with args.
12862 set dummy $tool_basename; ac_word=$2
12863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12864 $as_echo_n "checking for $ac_word... " >&6; }
12865 if ${ac_cv_path_WHICH+:} false; then :
12866   $as_echo_n "(cached) " >&6
12867 else
12868   case $WHICH in
12869   [\\/]* | ?:[\\/]*)
12870   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12871   ;;
12872   *)
12873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12874 for as_dir in $PATH
12875 do
12876   IFS=$as_save_IFS
12877   test -z "$as_dir" && as_dir=.
12878     for ac_exec_ext in '' $ac_executable_extensions; do
12879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12880     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12882     break 2
12883   fi
12884 done
12885   done
12886 IFS=$as_save_IFS
12887 
12888   ;;
12889 esac
12890 fi
12891 WHICH=$ac_cv_path_WHICH
12892 if test -n "$WHICH"; then
12893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12894 $as_echo "$WHICH" >&6; }
12895 else
12896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12897 $as_echo "no" >&6; }
12898 fi
12899 
12900 
12901           if test "x$WHICH" = x; then
12902             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12903           fi
12904         else
12905           # Otherwise we believe it is a complete path. Use it as it is.
12906           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12907 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12908           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12909 $as_echo_n "checking for WHICH... " >&6; }
12910           if test ! -x "$tool_specified"; then
12911             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12912 $as_echo "not found" >&6; }
12913             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12914           fi
12915           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12916 $as_echo "$tool_specified" >&6; }
12917         fi
12918       fi
12919     fi
12920 
12921   fi
12922 
12923 
12924 
12925   if test "x$WHICH" = x; then
12926     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12927   fi
12928 
12929 
12930 
12931 
12932 
12933   # Publish this variable in the help.
12934 
12935 
12936   if [ -z "${XARGS+x}" ]; then
12937     # The variable is not set by user, try to locate tool using the code snippet
12938     for ac_prog in xargs
12939 do
12940   # Extract the first word of "$ac_prog", so it can be a program name with args.
12941 set dummy $ac_prog; ac_word=$2
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12943 $as_echo_n "checking for $ac_word... " >&6; }
12944 if ${ac_cv_path_XARGS+:} false; then :
12945   $as_echo_n "(cached) " >&6
12946 else
12947   case $XARGS in
12948   [\\/]* | ?:[\\/]*)
12949   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12950   ;;
12951   *)
12952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12953 for as_dir in $PATH
12954 do
12955   IFS=$as_save_IFS
12956   test -z "$as_dir" && as_dir=.
12957     for ac_exec_ext in '' $ac_executable_extensions; do
12958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12959     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12961     break 2
12962   fi
12963 done
12964   done
12965 IFS=$as_save_IFS
12966 
12967   ;;
12968 esac
12969 fi
12970 XARGS=$ac_cv_path_XARGS
12971 if test -n "$XARGS"; then
12972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12973 $as_echo "$XARGS" >&6; }
12974 else
12975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12976 $as_echo "no" >&6; }
12977 fi
12978 
12979 
12980   test -n "$XARGS" && break
12981 done
12982 
12983   else
12984     # The variable is set, but is it from the command line or the environment?
12985 
12986     # Try to remove the string !XARGS! from our list.
12987     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12988     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12989       # If it failed, the variable was not from the command line. Ignore it,
12990       # but warn the user (except for BASH, which is always set by the calling BASH).
12991       if test "xXARGS" != xBASH; then
12992         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12993 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12994       fi
12995       # Try to locate tool using the code snippet
12996       for ac_prog in xargs
12997 do
12998   # Extract the first word of "$ac_prog", so it can be a program name with args.
12999 set dummy $ac_prog; ac_word=$2
13000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13001 $as_echo_n "checking for $ac_word... " >&6; }
13002 if ${ac_cv_path_XARGS+:} false; then :
13003   $as_echo_n "(cached) " >&6
13004 else
13005   case $XARGS in
13006   [\\/]* | ?:[\\/]*)
13007   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13008   ;;
13009   *)
13010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13011 for as_dir in $PATH
13012 do
13013   IFS=$as_save_IFS
13014   test -z "$as_dir" && as_dir=.
13015     for ac_exec_ext in '' $ac_executable_extensions; do
13016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13017     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13019     break 2
13020   fi
13021 done
13022   done
13023 IFS=$as_save_IFS
13024 
13025   ;;
13026 esac
13027 fi
13028 XARGS=$ac_cv_path_XARGS
13029 if test -n "$XARGS"; then
13030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13031 $as_echo "$XARGS" >&6; }
13032 else
13033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13034 $as_echo "no" >&6; }
13035 fi
13036 
13037 
13038   test -n "$XARGS" && break
13039 done
13040 
13041     else
13042       # If it succeeded, then it was overridden by the user. We will use it
13043       # for the tool.
13044 
13045       # First remove it from the list of overridden variables, so we can test
13046       # for unknown variables in the end.
13047       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13048 
13049       # Check if we try to supply an empty value
13050       if test "x$XARGS" = x; then
13051         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13052 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13053         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13054 $as_echo_n "checking for XARGS... " >&6; }
13055         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13056 $as_echo "disabled" >&6; }
13057       else
13058         # Check if the provided tool contains a complete path.
13059         tool_specified="$XARGS"
13060         tool_basename="${tool_specified##*/}"
13061         if test "x$tool_basename" = "x$tool_specified"; then
13062           # A command without a complete path is provided, search $PATH.
13063           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13064 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13065           # Extract the first word of "$tool_basename", so it can be a program name with args.
13066 set dummy $tool_basename; ac_word=$2
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13068 $as_echo_n "checking for $ac_word... " >&6; }
13069 if ${ac_cv_path_XARGS+:} false; then :
13070   $as_echo_n "(cached) " >&6
13071 else
13072   case $XARGS in
13073   [\\/]* | ?:[\\/]*)
13074   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13075   ;;
13076   *)
13077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13078 for as_dir in $PATH
13079 do
13080   IFS=$as_save_IFS
13081   test -z "$as_dir" && as_dir=.
13082     for ac_exec_ext in '' $ac_executable_extensions; do
13083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13084     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13086     break 2
13087   fi
13088 done
13089   done
13090 IFS=$as_save_IFS
13091 
13092   ;;
13093 esac
13094 fi
13095 XARGS=$ac_cv_path_XARGS
13096 if test -n "$XARGS"; then
13097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13098 $as_echo "$XARGS" >&6; }
13099 else
13100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13101 $as_echo "no" >&6; }
13102 fi
13103 
13104 
13105           if test "x$XARGS" = x; then
13106             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13107           fi
13108         else
13109           # Otherwise we believe it is a complete path. Use it as it is.
13110           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13111 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13112           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13113 $as_echo_n "checking for XARGS... " >&6; }
13114           if test ! -x "$tool_specified"; then
13115             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13116 $as_echo "not found" >&6; }
13117             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13118           fi
13119           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13120 $as_echo "$tool_specified" >&6; }
13121         fi
13122       fi
13123     fi
13124 
13125   fi
13126 
13127 
13128 
13129   if test "x$XARGS" = x; then
13130     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13131   fi
13132 
13133 
13134 
13135   # Then required tools that require some special treatment.
13136 
13137 
13138   # Publish this variable in the help.
13139 
13140 
13141   if [ -z "${AWK+x}" ]; then
13142     # The variable is not set by user, try to locate tool using the code snippet
13143     for ac_prog in gawk mawk nawk awk
13144 do
13145   # Extract the first word of "$ac_prog", so it can be a program name with args.
13146 set dummy $ac_prog; ac_word=$2
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13148 $as_echo_n "checking for $ac_word... " >&6; }
13149 if ${ac_cv_prog_AWK+:} false; then :
13150   $as_echo_n "(cached) " >&6
13151 else
13152   if test -n "$AWK"; then
13153   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13154 else
13155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13156 for as_dir in $PATH
13157 do
13158   IFS=$as_save_IFS
13159   test -z "$as_dir" && as_dir=.
13160     for ac_exec_ext in '' $ac_executable_extensions; do
13161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13162     ac_cv_prog_AWK="$ac_prog"
13163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13164     break 2
13165   fi
13166 done
13167   done
13168 IFS=$as_save_IFS
13169 
13170 fi
13171 fi
13172 AWK=$ac_cv_prog_AWK
13173 if test -n "$AWK"; then
13174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13175 $as_echo "$AWK" >&6; }
13176 else
13177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13178 $as_echo "no" >&6; }
13179 fi
13180 
13181 
13182   test -n "$AWK" && break
13183 done
13184 
13185   else
13186     # The variable is set, but is it from the command line or the environment?
13187 
13188     # Try to remove the string !AWK! from our list.
13189     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13190     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13191       # If it failed, the variable was not from the command line. Ignore it,
13192       # but warn the user (except for BASH, which is always set by the calling BASH).
13193       if test "xAWK" != xBASH; then
13194         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13195 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13196       fi
13197       # Try to locate tool using the code snippet
13198       for ac_prog in gawk mawk nawk awk
13199 do
13200   # Extract the first word of "$ac_prog", so it can be a program name with args.
13201 set dummy $ac_prog; ac_word=$2
13202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13203 $as_echo_n "checking for $ac_word... " >&6; }
13204 if ${ac_cv_prog_AWK+:} false; then :
13205   $as_echo_n "(cached) " >&6
13206 else
13207   if test -n "$AWK"; then
13208   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13209 else
13210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13211 for as_dir in $PATH
13212 do
13213   IFS=$as_save_IFS
13214   test -z "$as_dir" && as_dir=.
13215     for ac_exec_ext in '' $ac_executable_extensions; do
13216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13217     ac_cv_prog_AWK="$ac_prog"
13218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13219     break 2
13220   fi
13221 done
13222   done
13223 IFS=$as_save_IFS
13224 
13225 fi
13226 fi
13227 AWK=$ac_cv_prog_AWK
13228 if test -n "$AWK"; then
13229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13230 $as_echo "$AWK" >&6; }
13231 else
13232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13233 $as_echo "no" >&6; }
13234 fi
13235 
13236 
13237   test -n "$AWK" && break
13238 done
13239 
13240     else
13241       # If it succeeded, then it was overridden by the user. We will use it
13242       # for the tool.
13243 
13244       # First remove it from the list of overridden variables, so we can test
13245       # for unknown variables in the end.
13246       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13247 
13248       # Check if we try to supply an empty value
13249       if test "x$AWK" = x; then
13250         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13251 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13252         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13253 $as_echo_n "checking for AWK... " >&6; }
13254         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13255 $as_echo "disabled" >&6; }
13256       else
13257         # Check if the provided tool contains a complete path.
13258         tool_specified="$AWK"
13259         tool_basename="${tool_specified##*/}"
13260         if test "x$tool_basename" = "x$tool_specified"; then
13261           # A command without a complete path is provided, search $PATH.
13262           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13263 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13264           # Extract the first word of "$tool_basename", so it can be a program name with args.
13265 set dummy $tool_basename; ac_word=$2
13266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13267 $as_echo_n "checking for $ac_word... " >&6; }
13268 if ${ac_cv_path_AWK+:} false; then :
13269   $as_echo_n "(cached) " >&6
13270 else
13271   case $AWK in
13272   [\\/]* | ?:[\\/]*)
13273   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13274   ;;
13275   *)
13276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13277 for as_dir in $PATH
13278 do
13279   IFS=$as_save_IFS
13280   test -z "$as_dir" && as_dir=.
13281     for ac_exec_ext in '' $ac_executable_extensions; do
13282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13283     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13285     break 2
13286   fi
13287 done
13288   done
13289 IFS=$as_save_IFS
13290 
13291   ;;
13292 esac
13293 fi
13294 AWK=$ac_cv_path_AWK
13295 if test -n "$AWK"; then
13296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13297 $as_echo "$AWK" >&6; }
13298 else
13299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13300 $as_echo "no" >&6; }
13301 fi
13302 
13303 
13304           if test "x$AWK" = x; then
13305             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13306           fi
13307         else
13308           # Otherwise we believe it is a complete path. Use it as it is.
13309           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13310 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13311           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13312 $as_echo_n "checking for AWK... " >&6; }
13313           if test ! -x "$tool_specified"; then
13314             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13315 $as_echo "not found" >&6; }
13316             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13317           fi
13318           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13319 $as_echo "$tool_specified" >&6; }
13320         fi
13321       fi
13322     fi
13323 
13324   fi
13325 
13326 
13327   if test "x$AWK" = x; then
13328     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13329   fi
13330 
13331 
13332 
13333 
13334   # Publish this variable in the help.
13335 
13336 
13337   if [ -z "${GREP+x}" ]; then
13338     # The variable is not set by user, try to locate tool using the code snippet
13339     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13340 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13341 if ${ac_cv_path_GREP+:} false; then :
13342   $as_echo_n "(cached) " >&6
13343 else
13344   if test -z "$GREP"; then
13345   ac_path_GREP_found=false
13346   # Loop through the user's path and test for each of PROGNAME-LIST
13347   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13348 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13349 do
13350   IFS=$as_save_IFS
13351   test -z "$as_dir" && as_dir=.
13352     for ac_prog in grep ggrep; do
13353     for ac_exec_ext in '' $ac_executable_extensions; do
13354       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13355       as_fn_executable_p "$ac_path_GREP" || continue
13356 # Check for GNU ac_path_GREP and select it if it is found.
13357   # Check for GNU $ac_path_GREP
13358 case `"$ac_path_GREP" --version 2>&1` in
13359 *GNU*)
13360   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13361 *)
13362   ac_count=0
13363   $as_echo_n 0123456789 >"conftest.in"
13364   while :
13365   do
13366     cat "conftest.in" "conftest.in" >"conftest.tmp"
13367     mv "conftest.tmp" "conftest.in"
13368     cp "conftest.in" "conftest.nl"
13369     $as_echo 'GREP' >> "conftest.nl"
13370     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13371     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13372     as_fn_arith $ac_count + 1 && ac_count=$as_val
13373     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13374       # Best one so far, save it but keep looking for a better one
13375       ac_cv_path_GREP="$ac_path_GREP"
13376       ac_path_GREP_max=$ac_count
13377     fi
13378     # 10*(2^10) chars as input seems more than enough
13379     test $ac_count -gt 10 && break
13380   done
13381   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13382 esac
13383 
13384       $ac_path_GREP_found && break 3
13385     done
13386   done
13387   done
13388 IFS=$as_save_IFS
13389   if test -z "$ac_cv_path_GREP"; then
13390     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13391   fi
13392 else
13393   ac_cv_path_GREP=$GREP
13394 fi
13395 
13396 fi
13397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13398 $as_echo "$ac_cv_path_GREP" >&6; }
13399  GREP="$ac_cv_path_GREP"
13400 
13401 
13402   else
13403     # The variable is set, but is it from the command line or the environment?
13404 
13405     # Try to remove the string !GREP! from our list.
13406     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13407     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13408       # If it failed, the variable was not from the command line. Ignore it,
13409       # but warn the user (except for BASH, which is always set by the calling BASH).
13410       if test "xGREP" != xBASH; then
13411         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13412 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13413       fi
13414       # Try to locate tool using the code snippet
13415       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13416 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13417 if ${ac_cv_path_GREP+:} false; then :
13418   $as_echo_n "(cached) " >&6
13419 else
13420   if test -z "$GREP"; then
13421   ac_path_GREP_found=false
13422   # Loop through the user's path and test for each of PROGNAME-LIST
13423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13424 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13425 do
13426   IFS=$as_save_IFS
13427   test -z "$as_dir" && as_dir=.
13428     for ac_prog in grep ggrep; do
13429     for ac_exec_ext in '' $ac_executable_extensions; do
13430       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13431       as_fn_executable_p "$ac_path_GREP" || continue
13432 # Check for GNU ac_path_GREP and select it if it is found.
13433   # Check for GNU $ac_path_GREP
13434 case `"$ac_path_GREP" --version 2>&1` in
13435 *GNU*)
13436   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13437 *)
13438   ac_count=0
13439   $as_echo_n 0123456789 >"conftest.in"
13440   while :
13441   do
13442     cat "conftest.in" "conftest.in" >"conftest.tmp"
13443     mv "conftest.tmp" "conftest.in"
13444     cp "conftest.in" "conftest.nl"
13445     $as_echo 'GREP' >> "conftest.nl"
13446     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13447     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13448     as_fn_arith $ac_count + 1 && ac_count=$as_val
13449     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13450       # Best one so far, save it but keep looking for a better one
13451       ac_cv_path_GREP="$ac_path_GREP"
13452       ac_path_GREP_max=$ac_count
13453     fi
13454     # 10*(2^10) chars as input seems more than enough
13455     test $ac_count -gt 10 && break
13456   done
13457   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13458 esac
13459 
13460       $ac_path_GREP_found && break 3
13461     done
13462   done
13463   done
13464 IFS=$as_save_IFS
13465   if test -z "$ac_cv_path_GREP"; then
13466     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13467   fi
13468 else
13469   ac_cv_path_GREP=$GREP
13470 fi
13471 
13472 fi
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13474 $as_echo "$ac_cv_path_GREP" >&6; }
13475  GREP="$ac_cv_path_GREP"
13476 
13477 
13478     else
13479       # If it succeeded, then it was overridden by the user. We will use it
13480       # for the tool.
13481 
13482       # First remove it from the list of overridden variables, so we can test
13483       # for unknown variables in the end.
13484       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13485 
13486       # Check if we try to supply an empty value
13487       if test "x$GREP" = x; then
13488         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13489 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13490         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13491 $as_echo_n "checking for GREP... " >&6; }
13492         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13493 $as_echo "disabled" >&6; }
13494       else
13495         # Check if the provided tool contains a complete path.
13496         tool_specified="$GREP"
13497         tool_basename="${tool_specified##*/}"
13498         if test "x$tool_basename" = "x$tool_specified"; then
13499           # A command without a complete path is provided, search $PATH.
13500           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13501 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13502           # Extract the first word of "$tool_basename", so it can be a program name with args.
13503 set dummy $tool_basename; ac_word=$2
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13505 $as_echo_n "checking for $ac_word... " >&6; }
13506 if ${ac_cv_path_GREP+:} false; then :
13507   $as_echo_n "(cached) " >&6
13508 else
13509   case $GREP in
13510   [\\/]* | ?:[\\/]*)
13511   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13512   ;;
13513   *)
13514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13515 for as_dir in $PATH
13516 do
13517   IFS=$as_save_IFS
13518   test -z "$as_dir" && as_dir=.
13519     for ac_exec_ext in '' $ac_executable_extensions; do
13520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13521     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13523     break 2
13524   fi
13525 done
13526   done
13527 IFS=$as_save_IFS
13528 
13529   ;;
13530 esac
13531 fi
13532 GREP=$ac_cv_path_GREP
13533 if test -n "$GREP"; then
13534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13535 $as_echo "$GREP" >&6; }
13536 else
13537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13538 $as_echo "no" >&6; }
13539 fi
13540 
13541 
13542           if test "x$GREP" = x; then
13543             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13544           fi
13545         else
13546           # Otherwise we believe it is a complete path. Use it as it is.
13547           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13548 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13549           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13550 $as_echo_n "checking for GREP... " >&6; }
13551           if test ! -x "$tool_specified"; then
13552             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13553 $as_echo "not found" >&6; }
13554             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13555           fi
13556           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13557 $as_echo "$tool_specified" >&6; }
13558         fi
13559       fi
13560     fi
13561 
13562   fi
13563 
13564 
13565   if test "x$GREP" = x; then
13566     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13567   fi
13568 
13569 
13570 
13571 
13572   # Publish this variable in the help.
13573 
13574 
13575   if [ -z "${EGREP+x}" ]; then
13576     # The variable is not set by user, try to locate tool using the code snippet
13577     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13578 $as_echo_n "checking for egrep... " >&6; }
13579 if ${ac_cv_path_EGREP+:} false; then :
13580   $as_echo_n "(cached) " >&6
13581 else
13582   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13583    then ac_cv_path_EGREP="$GREP -E"
13584    else
13585      if test -z "$EGREP"; then
13586   ac_path_EGREP_found=false
13587   # Loop through the user's path and test for each of PROGNAME-LIST
13588   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13589 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13590 do
13591   IFS=$as_save_IFS
13592   test -z "$as_dir" && as_dir=.
13593     for ac_prog in egrep; do
13594     for ac_exec_ext in '' $ac_executable_extensions; do
13595       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13596       as_fn_executable_p "$ac_path_EGREP" || continue
13597 # Check for GNU ac_path_EGREP and select it if it is found.
13598   # Check for GNU $ac_path_EGREP
13599 case `"$ac_path_EGREP" --version 2>&1` in
13600 *GNU*)
13601   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13602 *)
13603   ac_count=0
13604   $as_echo_n 0123456789 >"conftest.in"
13605   while :
13606   do
13607     cat "conftest.in" "conftest.in" >"conftest.tmp"
13608     mv "conftest.tmp" "conftest.in"
13609     cp "conftest.in" "conftest.nl"
13610     $as_echo 'EGREP' >> "conftest.nl"
13611     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13612     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13613     as_fn_arith $ac_count + 1 && ac_count=$as_val
13614     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13615       # Best one so far, save it but keep looking for a better one
13616       ac_cv_path_EGREP="$ac_path_EGREP"
13617       ac_path_EGREP_max=$ac_count
13618     fi
13619     # 10*(2^10) chars as input seems more than enough
13620     test $ac_count -gt 10 && break
13621   done
13622   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13623 esac
13624 
13625       $ac_path_EGREP_found && break 3
13626     done
13627   done
13628   done
13629 IFS=$as_save_IFS
13630   if test -z "$ac_cv_path_EGREP"; then
13631     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13632   fi
13633 else
13634   ac_cv_path_EGREP=$EGREP
13635 fi
13636 
13637    fi
13638 fi
13639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13640 $as_echo "$ac_cv_path_EGREP" >&6; }
13641  EGREP="$ac_cv_path_EGREP"
13642 
13643 
13644   else
13645     # The variable is set, but is it from the command line or the environment?
13646 
13647     # Try to remove the string !EGREP! from our list.
13648     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13649     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13650       # If it failed, the variable was not from the command line. Ignore it,
13651       # but warn the user (except for BASH, which is always set by the calling BASH).
13652       if test "xEGREP" != xBASH; then
13653         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13654 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13655       fi
13656       # Try to locate tool using the code snippet
13657       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13658 $as_echo_n "checking for egrep... " >&6; }
13659 if ${ac_cv_path_EGREP+:} false; then :
13660   $as_echo_n "(cached) " >&6
13661 else
13662   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13663    then ac_cv_path_EGREP="$GREP -E"
13664    else
13665      if test -z "$EGREP"; then
13666   ac_path_EGREP_found=false
13667   # Loop through the user's path and test for each of PROGNAME-LIST
13668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13669 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13670 do
13671   IFS=$as_save_IFS
13672   test -z "$as_dir" && as_dir=.
13673     for ac_prog in egrep; do
13674     for ac_exec_ext in '' $ac_executable_extensions; do
13675       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13676       as_fn_executable_p "$ac_path_EGREP" || continue
13677 # Check for GNU ac_path_EGREP and select it if it is found.
13678   # Check for GNU $ac_path_EGREP
13679 case `"$ac_path_EGREP" --version 2>&1` in
13680 *GNU*)
13681   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13682 *)
13683   ac_count=0
13684   $as_echo_n 0123456789 >"conftest.in"
13685   while :
13686   do
13687     cat "conftest.in" "conftest.in" >"conftest.tmp"
13688     mv "conftest.tmp" "conftest.in"
13689     cp "conftest.in" "conftest.nl"
13690     $as_echo 'EGREP' >> "conftest.nl"
13691     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13692     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13693     as_fn_arith $ac_count + 1 && ac_count=$as_val
13694     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13695       # Best one so far, save it but keep looking for a better one
13696       ac_cv_path_EGREP="$ac_path_EGREP"
13697       ac_path_EGREP_max=$ac_count
13698     fi
13699     # 10*(2^10) chars as input seems more than enough
13700     test $ac_count -gt 10 && break
13701   done
13702   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13703 esac
13704 
13705       $ac_path_EGREP_found && break 3
13706     done
13707   done
13708   done
13709 IFS=$as_save_IFS
13710   if test -z "$ac_cv_path_EGREP"; then
13711     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13712   fi
13713 else
13714   ac_cv_path_EGREP=$EGREP
13715 fi
13716 
13717    fi
13718 fi
13719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13720 $as_echo "$ac_cv_path_EGREP" >&6; }
13721  EGREP="$ac_cv_path_EGREP"
13722 
13723 
13724     else
13725       # If it succeeded, then it was overridden by the user. We will use it
13726       # for the tool.
13727 
13728       # First remove it from the list of overridden variables, so we can test
13729       # for unknown variables in the end.
13730       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13731 
13732       # Check if we try to supply an empty value
13733       if test "x$EGREP" = x; then
13734         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13735 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13736         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13737 $as_echo_n "checking for EGREP... " >&6; }
13738         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13739 $as_echo "disabled" >&6; }
13740       else
13741         # Check if the provided tool contains a complete path.
13742         tool_specified="$EGREP"
13743         tool_basename="${tool_specified##*/}"
13744         if test "x$tool_basename" = "x$tool_specified"; then
13745           # A command without a complete path is provided, search $PATH.
13746           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13747 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13748           # Extract the first word of "$tool_basename", so it can be a program name with args.
13749 set dummy $tool_basename; ac_word=$2
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13751 $as_echo_n "checking for $ac_word... " >&6; }
13752 if ${ac_cv_path_EGREP+:} false; then :
13753   $as_echo_n "(cached) " >&6
13754 else
13755   case $EGREP in
13756   [\\/]* | ?:[\\/]*)
13757   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13758   ;;
13759   *)
13760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13761 for as_dir in $PATH
13762 do
13763   IFS=$as_save_IFS
13764   test -z "$as_dir" && as_dir=.
13765     for ac_exec_ext in '' $ac_executable_extensions; do
13766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13767     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13769     break 2
13770   fi
13771 done
13772   done
13773 IFS=$as_save_IFS
13774 
13775   ;;
13776 esac
13777 fi
13778 EGREP=$ac_cv_path_EGREP
13779 if test -n "$EGREP"; then
13780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13781 $as_echo "$EGREP" >&6; }
13782 else
13783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13784 $as_echo "no" >&6; }
13785 fi
13786 
13787 
13788           if test "x$EGREP" = x; then
13789             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13790           fi
13791         else
13792           # Otherwise we believe it is a complete path. Use it as it is.
13793           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13794 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13795           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13796 $as_echo_n "checking for EGREP... " >&6; }
13797           if test ! -x "$tool_specified"; then
13798             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13799 $as_echo "not found" >&6; }
13800             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13801           fi
13802           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13803 $as_echo "$tool_specified" >&6; }
13804         fi
13805       fi
13806     fi
13807 
13808   fi
13809 
13810 
13811   if test "x$EGREP" = x; then
13812     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13813   fi
13814 
13815 
13816 
13817 
13818   # Publish this variable in the help.
13819 
13820 
13821   if [ -z "${FGREP+x}" ]; then
13822     # The variable is not set by user, try to locate tool using the code snippet
13823     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13824 $as_echo_n "checking for fgrep... " >&6; }
13825 if ${ac_cv_path_FGREP+:} false; then :
13826   $as_echo_n "(cached) " >&6
13827 else
13828   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13829    then ac_cv_path_FGREP="$GREP -F"
13830    else
13831      if test -z "$FGREP"; then
13832   ac_path_FGREP_found=false
13833   # Loop through the user's path and test for each of PROGNAME-LIST
13834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13835 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13836 do
13837   IFS=$as_save_IFS
13838   test -z "$as_dir" && as_dir=.
13839     for ac_prog in fgrep; do
13840     for ac_exec_ext in '' $ac_executable_extensions; do
13841       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13842       as_fn_executable_p "$ac_path_FGREP" || continue
13843 # Check for GNU ac_path_FGREP and select it if it is found.
13844   # Check for GNU $ac_path_FGREP
13845 case `"$ac_path_FGREP" --version 2>&1` in
13846 *GNU*)
13847   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13848 *)
13849   ac_count=0
13850   $as_echo_n 0123456789 >"conftest.in"
13851   while :
13852   do
13853     cat "conftest.in" "conftest.in" >"conftest.tmp"
13854     mv "conftest.tmp" "conftest.in"
13855     cp "conftest.in" "conftest.nl"
13856     $as_echo 'FGREP' >> "conftest.nl"
13857     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13858     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13859     as_fn_arith $ac_count + 1 && ac_count=$as_val
13860     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13861       # Best one so far, save it but keep looking for a better one
13862       ac_cv_path_FGREP="$ac_path_FGREP"
13863       ac_path_FGREP_max=$ac_count
13864     fi
13865     # 10*(2^10) chars as input seems more than enough
13866     test $ac_count -gt 10 && break
13867   done
13868   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13869 esac
13870 
13871       $ac_path_FGREP_found && break 3
13872     done
13873   done
13874   done
13875 IFS=$as_save_IFS
13876   if test -z "$ac_cv_path_FGREP"; then
13877     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13878   fi
13879 else
13880   ac_cv_path_FGREP=$FGREP
13881 fi
13882 
13883    fi
13884 fi
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13886 $as_echo "$ac_cv_path_FGREP" >&6; }
13887  FGREP="$ac_cv_path_FGREP"
13888 
13889 
13890   else
13891     # The variable is set, but is it from the command line or the environment?
13892 
13893     # Try to remove the string !FGREP! from our list.
13894     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13895     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13896       # If it failed, the variable was not from the command line. Ignore it,
13897       # but warn the user (except for BASH, which is always set by the calling BASH).
13898       if test "xFGREP" != xBASH; then
13899         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13900 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13901       fi
13902       # Try to locate tool using the code snippet
13903       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13904 $as_echo_n "checking for fgrep... " >&6; }
13905 if ${ac_cv_path_FGREP+:} false; then :
13906   $as_echo_n "(cached) " >&6
13907 else
13908   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13909    then ac_cv_path_FGREP="$GREP -F"
13910    else
13911      if test -z "$FGREP"; then
13912   ac_path_FGREP_found=false
13913   # Loop through the user's path and test for each of PROGNAME-LIST
13914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13915 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13916 do
13917   IFS=$as_save_IFS
13918   test -z "$as_dir" && as_dir=.
13919     for ac_prog in fgrep; do
13920     for ac_exec_ext in '' $ac_executable_extensions; do
13921       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13922       as_fn_executable_p "$ac_path_FGREP" || continue
13923 # Check for GNU ac_path_FGREP and select it if it is found.
13924   # Check for GNU $ac_path_FGREP
13925 case `"$ac_path_FGREP" --version 2>&1` in
13926 *GNU*)
13927   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13928 *)
13929   ac_count=0
13930   $as_echo_n 0123456789 >"conftest.in"
13931   while :
13932   do
13933     cat "conftest.in" "conftest.in" >"conftest.tmp"
13934     mv "conftest.tmp" "conftest.in"
13935     cp "conftest.in" "conftest.nl"
13936     $as_echo 'FGREP' >> "conftest.nl"
13937     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13938     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13939     as_fn_arith $ac_count + 1 && ac_count=$as_val
13940     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13941       # Best one so far, save it but keep looking for a better one
13942       ac_cv_path_FGREP="$ac_path_FGREP"
13943       ac_path_FGREP_max=$ac_count
13944     fi
13945     # 10*(2^10) chars as input seems more than enough
13946     test $ac_count -gt 10 && break
13947   done
13948   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13949 esac
13950 
13951       $ac_path_FGREP_found && break 3
13952     done
13953   done
13954   done
13955 IFS=$as_save_IFS
13956   if test -z "$ac_cv_path_FGREP"; then
13957     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13958   fi
13959 else
13960   ac_cv_path_FGREP=$FGREP
13961 fi
13962 
13963    fi
13964 fi
13965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13966 $as_echo "$ac_cv_path_FGREP" >&6; }
13967  FGREP="$ac_cv_path_FGREP"
13968 
13969 
13970     else
13971       # If it succeeded, then it was overridden by the user. We will use it
13972       # for the tool.
13973 
13974       # First remove it from the list of overridden variables, so we can test
13975       # for unknown variables in the end.
13976       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13977 
13978       # Check if we try to supply an empty value
13979       if test "x$FGREP" = x; then
13980         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13981 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13982         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13983 $as_echo_n "checking for FGREP... " >&6; }
13984         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13985 $as_echo "disabled" >&6; }
13986       else
13987         # Check if the provided tool contains a complete path.
13988         tool_specified="$FGREP"
13989         tool_basename="${tool_specified##*/}"
13990         if test "x$tool_basename" = "x$tool_specified"; then
13991           # A command without a complete path is provided, search $PATH.
13992           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13993 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13994           # Extract the first word of "$tool_basename", so it can be a program name with args.
13995 set dummy $tool_basename; ac_word=$2
13996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13997 $as_echo_n "checking for $ac_word... " >&6; }
13998 if ${ac_cv_path_FGREP+:} false; then :
13999   $as_echo_n "(cached) " >&6
14000 else
14001   case $FGREP in
14002   [\\/]* | ?:[\\/]*)
14003   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14004   ;;
14005   *)
14006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14007 for as_dir in $PATH
14008 do
14009   IFS=$as_save_IFS
14010   test -z "$as_dir" && as_dir=.
14011     for ac_exec_ext in '' $ac_executable_extensions; do
14012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14013     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14015     break 2
14016   fi
14017 done
14018   done
14019 IFS=$as_save_IFS
14020 
14021   ;;
14022 esac
14023 fi
14024 FGREP=$ac_cv_path_FGREP
14025 if test -n "$FGREP"; then
14026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14027 $as_echo "$FGREP" >&6; }
14028 else
14029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14030 $as_echo "no" >&6; }
14031 fi
14032 
14033 
14034           if test "x$FGREP" = x; then
14035             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14036           fi
14037         else
14038           # Otherwise we believe it is a complete path. Use it as it is.
14039           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14040 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14041           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14042 $as_echo_n "checking for FGREP... " >&6; }
14043           if test ! -x "$tool_specified"; then
14044             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14045 $as_echo "not found" >&6; }
14046             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14047           fi
14048           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14049 $as_echo "$tool_specified" >&6; }
14050         fi
14051       fi
14052     fi
14053 
14054   fi
14055 
14056 
14057   if test "x$FGREP" = x; then
14058     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14059   fi
14060 
14061 
14062 
14063 
14064   # Publish this variable in the help.
14065 
14066 
14067   if [ -z "${SED+x}" ]; then
14068     # The variable is not set by user, try to locate tool using the code snippet
14069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14070 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14071 if ${ac_cv_path_SED+:} false; then :
14072   $as_echo_n "(cached) " >&6
14073 else
14074             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14075      for ac_i in 1 2 3 4 5 6 7; do
14076        ac_script="$ac_script$as_nl$ac_script"
14077      done
14078      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14079      { ac_script=; unset ac_script;}
14080      if test -z "$SED"; then
14081   ac_path_SED_found=false
14082   # Loop through the user's path and test for each of PROGNAME-LIST
14083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14084 for as_dir in $PATH
14085 do
14086   IFS=$as_save_IFS
14087   test -z "$as_dir" && as_dir=.
14088     for ac_prog in sed gsed; do
14089     for ac_exec_ext in '' $ac_executable_extensions; do
14090       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14091       as_fn_executable_p "$ac_path_SED" || continue
14092 # Check for GNU ac_path_SED and select it if it is found.
14093   # Check for GNU $ac_path_SED
14094 case `"$ac_path_SED" --version 2>&1` in
14095 *GNU*)
14096   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14097 *)
14098   ac_count=0
14099   $as_echo_n 0123456789 >"conftest.in"
14100   while :
14101   do
14102     cat "conftest.in" "conftest.in" >"conftest.tmp"
14103     mv "conftest.tmp" "conftest.in"
14104     cp "conftest.in" "conftest.nl"
14105     $as_echo '' >> "conftest.nl"
14106     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14107     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14108     as_fn_arith $ac_count + 1 && ac_count=$as_val
14109     if test $ac_count -gt ${ac_path_SED_max-0}; then
14110       # Best one so far, save it but keep looking for a better one
14111       ac_cv_path_SED="$ac_path_SED"
14112       ac_path_SED_max=$ac_count
14113     fi
14114     # 10*(2^10) chars as input seems more than enough
14115     test $ac_count -gt 10 && break
14116   done
14117   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14118 esac
14119 
14120       $ac_path_SED_found && break 3
14121     done
14122   done
14123   done
14124 IFS=$as_save_IFS
14125   if test -z "$ac_cv_path_SED"; then
14126     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14127   fi
14128 else
14129   ac_cv_path_SED=$SED
14130 fi
14131 
14132 fi
14133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14134 $as_echo "$ac_cv_path_SED" >&6; }
14135  SED="$ac_cv_path_SED"
14136   rm -f conftest.sed
14137 
14138   else
14139     # The variable is set, but is it from the command line or the environment?
14140 
14141     # Try to remove the string !SED! from our list.
14142     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14143     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14144       # If it failed, the variable was not from the command line. Ignore it,
14145       # but warn the user (except for BASH, which is always set by the calling BASH).
14146       if test "xSED" != xBASH; then
14147         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14148 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14149       fi
14150       # Try to locate tool using the code snippet
14151       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14152 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14153 if ${ac_cv_path_SED+:} false; then :
14154   $as_echo_n "(cached) " >&6
14155 else
14156             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14157      for ac_i in 1 2 3 4 5 6 7; do
14158        ac_script="$ac_script$as_nl$ac_script"
14159      done
14160      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14161      { ac_script=; unset ac_script;}
14162      if test -z "$SED"; then
14163   ac_path_SED_found=false
14164   # Loop through the user's path and test for each of PROGNAME-LIST
14165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14166 for as_dir in $PATH
14167 do
14168   IFS=$as_save_IFS
14169   test -z "$as_dir" && as_dir=.
14170     for ac_prog in sed gsed; do
14171     for ac_exec_ext in '' $ac_executable_extensions; do
14172       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14173       as_fn_executable_p "$ac_path_SED" || continue
14174 # Check for GNU ac_path_SED and select it if it is found.
14175   # Check for GNU $ac_path_SED
14176 case `"$ac_path_SED" --version 2>&1` in
14177 *GNU*)
14178   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14179 *)
14180   ac_count=0
14181   $as_echo_n 0123456789 >"conftest.in"
14182   while :
14183   do
14184     cat "conftest.in" "conftest.in" >"conftest.tmp"
14185     mv "conftest.tmp" "conftest.in"
14186     cp "conftest.in" "conftest.nl"
14187     $as_echo '' >> "conftest.nl"
14188     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14189     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14190     as_fn_arith $ac_count + 1 && ac_count=$as_val
14191     if test $ac_count -gt ${ac_path_SED_max-0}; then
14192       # Best one so far, save it but keep looking for a better one
14193       ac_cv_path_SED="$ac_path_SED"
14194       ac_path_SED_max=$ac_count
14195     fi
14196     # 10*(2^10) chars as input seems more than enough
14197     test $ac_count -gt 10 && break
14198   done
14199   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14200 esac
14201 
14202       $ac_path_SED_found && break 3
14203     done
14204   done
14205   done
14206 IFS=$as_save_IFS
14207   if test -z "$ac_cv_path_SED"; then
14208     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14209   fi
14210 else
14211   ac_cv_path_SED=$SED
14212 fi
14213 
14214 fi
14215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14216 $as_echo "$ac_cv_path_SED" >&6; }
14217  SED="$ac_cv_path_SED"
14218   rm -f conftest.sed
14219 
14220     else
14221       # If it succeeded, then it was overridden by the user. We will use it
14222       # for the tool.
14223 
14224       # First remove it from the list of overridden variables, so we can test
14225       # for unknown variables in the end.
14226       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14227 
14228       # Check if we try to supply an empty value
14229       if test "x$SED" = x; then
14230         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14231 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14232         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14233 $as_echo_n "checking for SED... " >&6; }
14234         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14235 $as_echo "disabled" >&6; }
14236       else
14237         # Check if the provided tool contains a complete path.
14238         tool_specified="$SED"
14239         tool_basename="${tool_specified##*/}"
14240         if test "x$tool_basename" = "x$tool_specified"; then
14241           # A command without a complete path is provided, search $PATH.
14242           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14243 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14244           # Extract the first word of "$tool_basename", so it can be a program name with args.
14245 set dummy $tool_basename; ac_word=$2
14246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14247 $as_echo_n "checking for $ac_word... " >&6; }
14248 if ${ac_cv_path_SED+:} false; then :
14249   $as_echo_n "(cached) " >&6
14250 else
14251   case $SED in
14252   [\\/]* | ?:[\\/]*)
14253   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14254   ;;
14255   *)
14256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14257 for as_dir in $PATH
14258 do
14259   IFS=$as_save_IFS
14260   test -z "$as_dir" && as_dir=.
14261     for ac_exec_ext in '' $ac_executable_extensions; do
14262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14263     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14265     break 2
14266   fi
14267 done
14268   done
14269 IFS=$as_save_IFS
14270 
14271   ;;
14272 esac
14273 fi
14274 SED=$ac_cv_path_SED
14275 if test -n "$SED"; then
14276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14277 $as_echo "$SED" >&6; }
14278 else
14279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14280 $as_echo "no" >&6; }
14281 fi
14282 
14283 
14284           if test "x$SED" = x; then
14285             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14286           fi
14287         else
14288           # Otherwise we believe it is a complete path. Use it as it is.
14289           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14290 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14291           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14292 $as_echo_n "checking for SED... " >&6; }
14293           if test ! -x "$tool_specified"; then
14294             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14295 $as_echo "not found" >&6; }
14296             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14297           fi
14298           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14299 $as_echo "$tool_specified" >&6; }
14300         fi
14301       fi
14302     fi
14303 
14304   fi
14305 
14306 
14307   if test "x$SED" = x; then
14308     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14309   fi
14310 
14311 
14312 
14313   # Always force rm.
14314   RM="$RM -f"
14315 
14316   # pwd behaves differently on various platforms and some don't support the -L flag.
14317   # Always use the bash builtin pwd to get uniform behavior.
14318   THEPWDCMD=pwd
14319 
14320   # These are not required on all platforms
14321 
14322 
14323   # Publish this variable in the help.
14324 
14325 
14326   if [ -z "${CYGPATH+x}" ]; then
14327     # The variable is not set by user, try to locate tool using the code snippet
14328     for ac_prog in cygpath
14329 do
14330   # Extract the first word of "$ac_prog", so it can be a program name with args.
14331 set dummy $ac_prog; ac_word=$2
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14333 $as_echo_n "checking for $ac_word... " >&6; }
14334 if ${ac_cv_path_CYGPATH+:} false; then :
14335   $as_echo_n "(cached) " >&6
14336 else
14337   case $CYGPATH in
14338   [\\/]* | ?:[\\/]*)
14339   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14340   ;;
14341   *)
14342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14343 for as_dir in $PATH
14344 do
14345   IFS=$as_save_IFS
14346   test -z "$as_dir" && as_dir=.
14347     for ac_exec_ext in '' $ac_executable_extensions; do
14348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14349     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14351     break 2
14352   fi
14353 done
14354   done
14355 IFS=$as_save_IFS
14356 
14357   ;;
14358 esac
14359 fi
14360 CYGPATH=$ac_cv_path_CYGPATH
14361 if test -n "$CYGPATH"; then
14362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14363 $as_echo "$CYGPATH" >&6; }
14364 else
14365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14366 $as_echo "no" >&6; }
14367 fi
14368 
14369 
14370   test -n "$CYGPATH" && break
14371 done
14372 
14373   else
14374     # The variable is set, but is it from the command line or the environment?
14375 
14376     # Try to remove the string !CYGPATH! from our list.
14377     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14378     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14379       # If it failed, the variable was not from the command line. Ignore it,
14380       # but warn the user (except for BASH, which is always set by the calling BASH).
14381       if test "xCYGPATH" != xBASH; then
14382         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14383 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14384       fi
14385       # Try to locate tool using the code snippet
14386       for ac_prog in cygpath
14387 do
14388   # Extract the first word of "$ac_prog", so it can be a program name with args.
14389 set dummy $ac_prog; ac_word=$2
14390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14391 $as_echo_n "checking for $ac_word... " >&6; }
14392 if ${ac_cv_path_CYGPATH+:} false; then :
14393   $as_echo_n "(cached) " >&6
14394 else
14395   case $CYGPATH in
14396   [\\/]* | ?:[\\/]*)
14397   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14398   ;;
14399   *)
14400   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14401 for as_dir in $PATH
14402 do
14403   IFS=$as_save_IFS
14404   test -z "$as_dir" && as_dir=.
14405     for ac_exec_ext in '' $ac_executable_extensions; do
14406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14407     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14409     break 2
14410   fi
14411 done
14412   done
14413 IFS=$as_save_IFS
14414 
14415   ;;
14416 esac
14417 fi
14418 CYGPATH=$ac_cv_path_CYGPATH
14419 if test -n "$CYGPATH"; then
14420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14421 $as_echo "$CYGPATH" >&6; }
14422 else
14423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14424 $as_echo "no" >&6; }
14425 fi
14426 
14427 
14428   test -n "$CYGPATH" && break
14429 done
14430 
14431     else
14432       # If it succeeded, then it was overridden by the user. We will use it
14433       # for the tool.
14434 
14435       # First remove it from the list of overridden variables, so we can test
14436       # for unknown variables in the end.
14437       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14438 
14439       # Check if we try to supply an empty value
14440       if test "x$CYGPATH" = x; then
14441         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14442 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14443         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14444 $as_echo_n "checking for CYGPATH... " >&6; }
14445         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14446 $as_echo "disabled" >&6; }
14447       else
14448         # Check if the provided tool contains a complete path.
14449         tool_specified="$CYGPATH"
14450         tool_basename="${tool_specified##*/}"
14451         if test "x$tool_basename" = "x$tool_specified"; then
14452           # A command without a complete path is provided, search $PATH.
14453           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14454 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14455           # Extract the first word of "$tool_basename", so it can be a program name with args.
14456 set dummy $tool_basename; ac_word=$2
14457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14458 $as_echo_n "checking for $ac_word... " >&6; }
14459 if ${ac_cv_path_CYGPATH+:} false; then :
14460   $as_echo_n "(cached) " >&6
14461 else
14462   case $CYGPATH in
14463   [\\/]* | ?:[\\/]*)
14464   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14465   ;;
14466   *)
14467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14468 for as_dir in $PATH
14469 do
14470   IFS=$as_save_IFS
14471   test -z "$as_dir" && as_dir=.
14472     for ac_exec_ext in '' $ac_executable_extensions; do
14473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14474     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14476     break 2
14477   fi
14478 done
14479   done
14480 IFS=$as_save_IFS
14481 
14482   ;;
14483 esac
14484 fi
14485 CYGPATH=$ac_cv_path_CYGPATH
14486 if test -n "$CYGPATH"; then
14487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14488 $as_echo "$CYGPATH" >&6; }
14489 else
14490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14491 $as_echo "no" >&6; }
14492 fi
14493 
14494 
14495           if test "x$CYGPATH" = x; then
14496             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14497           fi
14498         else
14499           # Otherwise we believe it is a complete path. Use it as it is.
14500           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14501 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14502           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14503 $as_echo_n "checking for CYGPATH... " >&6; }
14504           if test ! -x "$tool_specified"; then
14505             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14506 $as_echo "not found" >&6; }
14507             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14508           fi
14509           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14510 $as_echo "$tool_specified" >&6; }
14511         fi
14512       fi
14513     fi
14514 
14515   fi
14516 
14517 
14518 
14519 
14520   # Publish this variable in the help.
14521 
14522 
14523   if [ -z "${READLINK+x}" ]; then
14524     # The variable is not set by user, try to locate tool using the code snippet
14525     for ac_prog in greadlink readlink
14526 do
14527   # Extract the first word of "$ac_prog", so it can be a program name with args.
14528 set dummy $ac_prog; ac_word=$2
14529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14530 $as_echo_n "checking for $ac_word... " >&6; }
14531 if ${ac_cv_path_READLINK+:} false; then :
14532   $as_echo_n "(cached) " >&6
14533 else
14534   case $READLINK in
14535   [\\/]* | ?:[\\/]*)
14536   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14537   ;;
14538   *)
14539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14540 for as_dir in $PATH
14541 do
14542   IFS=$as_save_IFS
14543   test -z "$as_dir" && as_dir=.
14544     for ac_exec_ext in '' $ac_executable_extensions; do
14545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14546     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14548     break 2
14549   fi
14550 done
14551   done
14552 IFS=$as_save_IFS
14553 
14554   ;;
14555 esac
14556 fi
14557 READLINK=$ac_cv_path_READLINK
14558 if test -n "$READLINK"; then
14559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14560 $as_echo "$READLINK" >&6; }
14561 else
14562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14563 $as_echo "no" >&6; }
14564 fi
14565 
14566 
14567   test -n "$READLINK" && break
14568 done
14569 
14570   else
14571     # The variable is set, but is it from the command line or the environment?
14572 
14573     # Try to remove the string !READLINK! from our list.
14574     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14575     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14576       # If it failed, the variable was not from the command line. Ignore it,
14577       # but warn the user (except for BASH, which is always set by the calling BASH).
14578       if test "xREADLINK" != xBASH; then
14579         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14580 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14581       fi
14582       # Try to locate tool using the code snippet
14583       for ac_prog in greadlink readlink
14584 do
14585   # Extract the first word of "$ac_prog", so it can be a program name with args.
14586 set dummy $ac_prog; ac_word=$2
14587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14588 $as_echo_n "checking for $ac_word... " >&6; }
14589 if ${ac_cv_path_READLINK+:} false; then :
14590   $as_echo_n "(cached) " >&6
14591 else
14592   case $READLINK in
14593   [\\/]* | ?:[\\/]*)
14594   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14595   ;;
14596   *)
14597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14598 for as_dir in $PATH
14599 do
14600   IFS=$as_save_IFS
14601   test -z "$as_dir" && as_dir=.
14602     for ac_exec_ext in '' $ac_executable_extensions; do
14603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14604     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14606     break 2
14607   fi
14608 done
14609   done
14610 IFS=$as_save_IFS
14611 
14612   ;;
14613 esac
14614 fi
14615 READLINK=$ac_cv_path_READLINK
14616 if test -n "$READLINK"; then
14617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14618 $as_echo "$READLINK" >&6; }
14619 else
14620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14621 $as_echo "no" >&6; }
14622 fi
14623 
14624 
14625   test -n "$READLINK" && break
14626 done
14627 
14628     else
14629       # If it succeeded, then it was overridden by the user. We will use it
14630       # for the tool.
14631 
14632       # First remove it from the list of overridden variables, so we can test
14633       # for unknown variables in the end.
14634       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14635 
14636       # Check if we try to supply an empty value
14637       if test "x$READLINK" = x; then
14638         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14639 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14640         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14641 $as_echo_n "checking for READLINK... " >&6; }
14642         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14643 $as_echo "disabled" >&6; }
14644       else
14645         # Check if the provided tool contains a complete path.
14646         tool_specified="$READLINK"
14647         tool_basename="${tool_specified##*/}"
14648         if test "x$tool_basename" = "x$tool_specified"; then
14649           # A command without a complete path is provided, search $PATH.
14650           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14651 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14652           # Extract the first word of "$tool_basename", so it can be a program name with args.
14653 set dummy $tool_basename; ac_word=$2
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14655 $as_echo_n "checking for $ac_word... " >&6; }
14656 if ${ac_cv_path_READLINK+:} false; then :
14657   $as_echo_n "(cached) " >&6
14658 else
14659   case $READLINK in
14660   [\\/]* | ?:[\\/]*)
14661   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14662   ;;
14663   *)
14664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14665 for as_dir in $PATH
14666 do
14667   IFS=$as_save_IFS
14668   test -z "$as_dir" && as_dir=.
14669     for ac_exec_ext in '' $ac_executable_extensions; do
14670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14671     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14673     break 2
14674   fi
14675 done
14676   done
14677 IFS=$as_save_IFS
14678 
14679   ;;
14680 esac
14681 fi
14682 READLINK=$ac_cv_path_READLINK
14683 if test -n "$READLINK"; then
14684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14685 $as_echo "$READLINK" >&6; }
14686 else
14687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14688 $as_echo "no" >&6; }
14689 fi
14690 
14691 
14692           if test "x$READLINK" = x; then
14693             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14694           fi
14695         else
14696           # Otherwise we believe it is a complete path. Use it as it is.
14697           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14698 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14699           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14700 $as_echo_n "checking for READLINK... " >&6; }
14701           if test ! -x "$tool_specified"; then
14702             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14703 $as_echo "not found" >&6; }
14704             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14705           fi
14706           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14707 $as_echo "$tool_specified" >&6; }
14708         fi
14709       fi
14710     fi
14711 
14712   fi
14713 
14714 
14715 
14716 
14717   # Publish this variable in the help.
14718 
14719 
14720   if [ -z "${DF+x}" ]; then
14721     # The variable is not set by user, try to locate tool using the code snippet
14722     for ac_prog in df
14723 do
14724   # Extract the first word of "$ac_prog", so it can be a program name with args.
14725 set dummy $ac_prog; ac_word=$2
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14727 $as_echo_n "checking for $ac_word... " >&6; }
14728 if ${ac_cv_path_DF+:} false; then :
14729   $as_echo_n "(cached) " >&6
14730 else
14731   case $DF in
14732   [\\/]* | ?:[\\/]*)
14733   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14734   ;;
14735   *)
14736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14737 for as_dir in $PATH
14738 do
14739   IFS=$as_save_IFS
14740   test -z "$as_dir" && as_dir=.
14741     for ac_exec_ext in '' $ac_executable_extensions; do
14742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14743     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14745     break 2
14746   fi
14747 done
14748   done
14749 IFS=$as_save_IFS
14750 
14751   ;;
14752 esac
14753 fi
14754 DF=$ac_cv_path_DF
14755 if test -n "$DF"; then
14756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14757 $as_echo "$DF" >&6; }
14758 else
14759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14760 $as_echo "no" >&6; }
14761 fi
14762 
14763 
14764   test -n "$DF" && break
14765 done
14766 
14767   else
14768     # The variable is set, but is it from the command line or the environment?
14769 
14770     # Try to remove the string !DF! from our list.
14771     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14772     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14773       # If it failed, the variable was not from the command line. Ignore it,
14774       # but warn the user (except for BASH, which is always set by the calling BASH).
14775       if test "xDF" != xBASH; then
14776         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14777 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14778       fi
14779       # Try to locate tool using the code snippet
14780       for ac_prog in df
14781 do
14782   # Extract the first word of "$ac_prog", so it can be a program name with args.
14783 set dummy $ac_prog; ac_word=$2
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14785 $as_echo_n "checking for $ac_word... " >&6; }
14786 if ${ac_cv_path_DF+:} false; then :
14787   $as_echo_n "(cached) " >&6
14788 else
14789   case $DF in
14790   [\\/]* | ?:[\\/]*)
14791   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14792   ;;
14793   *)
14794   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14795 for as_dir in $PATH
14796 do
14797   IFS=$as_save_IFS
14798   test -z "$as_dir" && as_dir=.
14799     for ac_exec_ext in '' $ac_executable_extensions; do
14800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14801     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14803     break 2
14804   fi
14805 done
14806   done
14807 IFS=$as_save_IFS
14808 
14809   ;;
14810 esac
14811 fi
14812 DF=$ac_cv_path_DF
14813 if test -n "$DF"; then
14814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14815 $as_echo "$DF" >&6; }
14816 else
14817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14818 $as_echo "no" >&6; }
14819 fi
14820 
14821 
14822   test -n "$DF" && break
14823 done
14824 
14825     else
14826       # If it succeeded, then it was overridden by the user. We will use it
14827       # for the tool.
14828 
14829       # First remove it from the list of overridden variables, so we can test
14830       # for unknown variables in the end.
14831       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14832 
14833       # Check if we try to supply an empty value
14834       if test "x$DF" = x; then
14835         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14836 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14837         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14838 $as_echo_n "checking for DF... " >&6; }
14839         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14840 $as_echo "disabled" >&6; }
14841       else
14842         # Check if the provided tool contains a complete path.
14843         tool_specified="$DF"
14844         tool_basename="${tool_specified##*/}"
14845         if test "x$tool_basename" = "x$tool_specified"; then
14846           # A command without a complete path is provided, search $PATH.
14847           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14848 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14849           # Extract the first word of "$tool_basename", so it can be a program name with args.
14850 set dummy $tool_basename; ac_word=$2
14851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14852 $as_echo_n "checking for $ac_word... " >&6; }
14853 if ${ac_cv_path_DF+:} false; then :
14854   $as_echo_n "(cached) " >&6
14855 else
14856   case $DF in
14857   [\\/]* | ?:[\\/]*)
14858   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14859   ;;
14860   *)
14861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14862 for as_dir in $PATH
14863 do
14864   IFS=$as_save_IFS
14865   test -z "$as_dir" && as_dir=.
14866     for ac_exec_ext in '' $ac_executable_extensions; do
14867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14868     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14870     break 2
14871   fi
14872 done
14873   done
14874 IFS=$as_save_IFS
14875 
14876   ;;
14877 esac
14878 fi
14879 DF=$ac_cv_path_DF
14880 if test -n "$DF"; then
14881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14882 $as_echo "$DF" >&6; }
14883 else
14884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14885 $as_echo "no" >&6; }
14886 fi
14887 
14888 
14889           if test "x$DF" = x; then
14890             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14891           fi
14892         else
14893           # Otherwise we believe it is a complete path. Use it as it is.
14894           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14895 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14896           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14897 $as_echo_n "checking for DF... " >&6; }
14898           if test ! -x "$tool_specified"; then
14899             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14900 $as_echo "not found" >&6; }
14901             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14902           fi
14903           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14904 $as_echo "$tool_specified" >&6; }
14905         fi
14906       fi
14907     fi
14908 
14909   fi
14910 
14911 
14912 
14913 
14914   # Publish this variable in the help.
14915 
14916 
14917   if [ -z "${CPIO+x}" ]; then
14918     # The variable is not set by user, try to locate tool using the code snippet
14919     for ac_prog in cpio bsdcpio
14920 do
14921   # Extract the first word of "$ac_prog", so it can be a program name with args.
14922 set dummy $ac_prog; ac_word=$2
14923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14924 $as_echo_n "checking for $ac_word... " >&6; }
14925 if ${ac_cv_path_CPIO+:} false; then :
14926   $as_echo_n "(cached) " >&6
14927 else
14928   case $CPIO in
14929   [\\/]* | ?:[\\/]*)
14930   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14931   ;;
14932   *)
14933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14934 for as_dir in $PATH
14935 do
14936   IFS=$as_save_IFS
14937   test -z "$as_dir" && as_dir=.
14938     for ac_exec_ext in '' $ac_executable_extensions; do
14939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14940     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14942     break 2
14943   fi
14944 done
14945   done
14946 IFS=$as_save_IFS
14947 
14948   ;;
14949 esac
14950 fi
14951 CPIO=$ac_cv_path_CPIO
14952 if test -n "$CPIO"; then
14953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14954 $as_echo "$CPIO" >&6; }
14955 else
14956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14957 $as_echo "no" >&6; }
14958 fi
14959 
14960 
14961   test -n "$CPIO" && break
14962 done
14963 
14964   else
14965     # The variable is set, but is it from the command line or the environment?
14966 
14967     # Try to remove the string !CPIO! from our list.
14968     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14969     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14970       # If it failed, the variable was not from the command line. Ignore it,
14971       # but warn the user (except for BASH, which is always set by the calling BASH).
14972       if test "xCPIO" != xBASH; then
14973         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14974 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14975       fi
14976       # Try to locate tool using the code snippet
14977       for ac_prog in cpio bsdcpio
14978 do
14979   # Extract the first word of "$ac_prog", so it can be a program name with args.
14980 set dummy $ac_prog; ac_word=$2
14981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14982 $as_echo_n "checking for $ac_word... " >&6; }
14983 if ${ac_cv_path_CPIO+:} false; then :
14984   $as_echo_n "(cached) " >&6
14985 else
14986   case $CPIO in
14987   [\\/]* | ?:[\\/]*)
14988   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14989   ;;
14990   *)
14991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14992 for as_dir in $PATH
14993 do
14994   IFS=$as_save_IFS
14995   test -z "$as_dir" && as_dir=.
14996     for ac_exec_ext in '' $ac_executable_extensions; do
14997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14998     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15000     break 2
15001   fi
15002 done
15003   done
15004 IFS=$as_save_IFS
15005 
15006   ;;
15007 esac
15008 fi
15009 CPIO=$ac_cv_path_CPIO
15010 if test -n "$CPIO"; then
15011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15012 $as_echo "$CPIO" >&6; }
15013 else
15014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15015 $as_echo "no" >&6; }
15016 fi
15017 
15018 
15019   test -n "$CPIO" && break
15020 done
15021 
15022     else
15023       # If it succeeded, then it was overridden by the user. We will use it
15024       # for the tool.
15025 
15026       # First remove it from the list of overridden variables, so we can test
15027       # for unknown variables in the end.
15028       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15029 
15030       # Check if we try to supply an empty value
15031       if test "x$CPIO" = x; then
15032         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15033 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15034         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15035 $as_echo_n "checking for CPIO... " >&6; }
15036         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15037 $as_echo "disabled" >&6; }
15038       else
15039         # Check if the provided tool contains a complete path.
15040         tool_specified="$CPIO"
15041         tool_basename="${tool_specified##*/}"
15042         if test "x$tool_basename" = "x$tool_specified"; then
15043           # A command without a complete path is provided, search $PATH.
15044           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15045 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15046           # Extract the first word of "$tool_basename", so it can be a program name with args.
15047 set dummy $tool_basename; ac_word=$2
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15049 $as_echo_n "checking for $ac_word... " >&6; }
15050 if ${ac_cv_path_CPIO+:} false; then :
15051   $as_echo_n "(cached) " >&6
15052 else
15053   case $CPIO in
15054   [\\/]* | ?:[\\/]*)
15055   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15056   ;;
15057   *)
15058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15059 for as_dir in $PATH
15060 do
15061   IFS=$as_save_IFS
15062   test -z "$as_dir" && as_dir=.
15063     for ac_exec_ext in '' $ac_executable_extensions; do
15064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15065     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15067     break 2
15068   fi
15069 done
15070   done
15071 IFS=$as_save_IFS
15072 
15073   ;;
15074 esac
15075 fi
15076 CPIO=$ac_cv_path_CPIO
15077 if test -n "$CPIO"; then
15078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15079 $as_echo "$CPIO" >&6; }
15080 else
15081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15082 $as_echo "no" >&6; }
15083 fi
15084 
15085 
15086           if test "x$CPIO" = x; then
15087             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15088           fi
15089         else
15090           # Otherwise we believe it is a complete path. Use it as it is.
15091           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15092 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15093           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15094 $as_echo_n "checking for CPIO... " >&6; }
15095           if test ! -x "$tool_specified"; then
15096             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15097 $as_echo "not found" >&6; }
15098             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15099           fi
15100           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15101 $as_echo "$tool_specified" >&6; }
15102         fi
15103       fi
15104     fi
15105 
15106   fi
15107 
15108 
15109 
15110 
15111   # Publish this variable in the help.
15112 
15113 
15114   if [ -z "${NICE+x}" ]; then
15115     # The variable is not set by user, try to locate tool using the code snippet
15116     for ac_prog in nice
15117 do
15118   # Extract the first word of "$ac_prog", so it can be a program name with args.
15119 set dummy $ac_prog; ac_word=$2
15120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15121 $as_echo_n "checking for $ac_word... " >&6; }
15122 if ${ac_cv_path_NICE+:} false; then :
15123   $as_echo_n "(cached) " >&6
15124 else
15125   case $NICE in
15126   [\\/]* | ?:[\\/]*)
15127   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15128   ;;
15129   *)
15130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15131 for as_dir in $PATH
15132 do
15133   IFS=$as_save_IFS
15134   test -z "$as_dir" && as_dir=.
15135     for ac_exec_ext in '' $ac_executable_extensions; do
15136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15137     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15139     break 2
15140   fi
15141 done
15142   done
15143 IFS=$as_save_IFS
15144 
15145   ;;
15146 esac
15147 fi
15148 NICE=$ac_cv_path_NICE
15149 if test -n "$NICE"; then
15150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15151 $as_echo "$NICE" >&6; }
15152 else
15153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15154 $as_echo "no" >&6; }
15155 fi
15156 
15157 
15158   test -n "$NICE" && break
15159 done
15160 
15161   else
15162     # The variable is set, but is it from the command line or the environment?
15163 
15164     # Try to remove the string !NICE! from our list.
15165     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15166     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15167       # If it failed, the variable was not from the command line. Ignore it,
15168       # but warn the user (except for BASH, which is always set by the calling BASH).
15169       if test "xNICE" != xBASH; then
15170         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15171 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15172       fi
15173       # Try to locate tool using the code snippet
15174       for ac_prog in nice
15175 do
15176   # Extract the first word of "$ac_prog", so it can be a program name with args.
15177 set dummy $ac_prog; ac_word=$2
15178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15179 $as_echo_n "checking for $ac_word... " >&6; }
15180 if ${ac_cv_path_NICE+:} false; then :
15181   $as_echo_n "(cached) " >&6
15182 else
15183   case $NICE in
15184   [\\/]* | ?:[\\/]*)
15185   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15186   ;;
15187   *)
15188   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15189 for as_dir in $PATH
15190 do
15191   IFS=$as_save_IFS
15192   test -z "$as_dir" && as_dir=.
15193     for ac_exec_ext in '' $ac_executable_extensions; do
15194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15195     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15197     break 2
15198   fi
15199 done
15200   done
15201 IFS=$as_save_IFS
15202 
15203   ;;
15204 esac
15205 fi
15206 NICE=$ac_cv_path_NICE
15207 if test -n "$NICE"; then
15208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15209 $as_echo "$NICE" >&6; }
15210 else
15211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15212 $as_echo "no" >&6; }
15213 fi
15214 
15215 
15216   test -n "$NICE" && break
15217 done
15218 
15219     else
15220       # If it succeeded, then it was overridden by the user. We will use it
15221       # for the tool.
15222 
15223       # First remove it from the list of overridden variables, so we can test
15224       # for unknown variables in the end.
15225       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15226 
15227       # Check if we try to supply an empty value
15228       if test "x$NICE" = x; then
15229         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15230 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15231         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15232 $as_echo_n "checking for NICE... " >&6; }
15233         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15234 $as_echo "disabled" >&6; }
15235       else
15236         # Check if the provided tool contains a complete path.
15237         tool_specified="$NICE"
15238         tool_basename="${tool_specified##*/}"
15239         if test "x$tool_basename" = "x$tool_specified"; then
15240           # A command without a complete path is provided, search $PATH.
15241           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15242 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15243           # Extract the first word of "$tool_basename", so it can be a program name with args.
15244 set dummy $tool_basename; ac_word=$2
15245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15246 $as_echo_n "checking for $ac_word... " >&6; }
15247 if ${ac_cv_path_NICE+:} false; then :
15248   $as_echo_n "(cached) " >&6
15249 else
15250   case $NICE in
15251   [\\/]* | ?:[\\/]*)
15252   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15253   ;;
15254   *)
15255   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15256 for as_dir in $PATH
15257 do
15258   IFS=$as_save_IFS
15259   test -z "$as_dir" && as_dir=.
15260     for ac_exec_ext in '' $ac_executable_extensions; do
15261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15262     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15264     break 2
15265   fi
15266 done
15267   done
15268 IFS=$as_save_IFS
15269 
15270   ;;
15271 esac
15272 fi
15273 NICE=$ac_cv_path_NICE
15274 if test -n "$NICE"; then
15275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15276 $as_echo "$NICE" >&6; }
15277 else
15278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15279 $as_echo "no" >&6; }
15280 fi
15281 
15282 
15283           if test "x$NICE" = x; then
15284             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15285           fi
15286         else
15287           # Otherwise we believe it is a complete path. Use it as it is.
15288           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15289 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15290           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15291 $as_echo_n "checking for NICE... " >&6; }
15292           if test ! -x "$tool_specified"; then
15293             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15294 $as_echo "not found" >&6; }
15295             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15296           fi
15297           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15298 $as_echo "$tool_specified" >&6; }
15299         fi
15300       fi
15301     fi
15302 
15303   fi
15304 
15305 
15306 
15307 
15308   # Publish this variable in the help.
15309 
15310 
15311   if [ -z "${PANDOC+x}" ]; then
15312     # The variable is not set by user, try to locate tool using the code snippet
15313     for ac_prog in pandoc
15314 do
15315   # Extract the first word of "$ac_prog", so it can be a program name with args.
15316 set dummy $ac_prog; ac_word=$2
15317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15318 $as_echo_n "checking for $ac_word... " >&6; }
15319 if ${ac_cv_path_PANDOC+:} false; then :
15320   $as_echo_n "(cached) " >&6
15321 else
15322   case $PANDOC in
15323   [\\/]* | ?:[\\/]*)
15324   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15325   ;;
15326   *)
15327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15328 for as_dir in $PATH
15329 do
15330   IFS=$as_save_IFS
15331   test -z "$as_dir" && as_dir=.
15332     for ac_exec_ext in '' $ac_executable_extensions; do
15333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15334     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15336     break 2
15337   fi
15338 done
15339   done
15340 IFS=$as_save_IFS
15341 
15342   ;;
15343 esac
15344 fi
15345 PANDOC=$ac_cv_path_PANDOC
15346 if test -n "$PANDOC"; then
15347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15348 $as_echo "$PANDOC" >&6; }
15349 else
15350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15351 $as_echo "no" >&6; }
15352 fi
15353 
15354 
15355   test -n "$PANDOC" && break
15356 done
15357 
15358   else
15359     # The variable is set, but is it from the command line or the environment?
15360 
15361     # Try to remove the string !PANDOC! from our list.
15362     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15363     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15364       # If it failed, the variable was not from the command line. Ignore it,
15365       # but warn the user (except for BASH, which is always set by the calling BASH).
15366       if test "xPANDOC" != xBASH; then
15367         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15368 $as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15369       fi
15370       # Try to locate tool using the code snippet
15371       for ac_prog in pandoc
15372 do
15373   # Extract the first word of "$ac_prog", so it can be a program name with args.
15374 set dummy $ac_prog; ac_word=$2
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15376 $as_echo_n "checking for $ac_word... " >&6; }
15377 if ${ac_cv_path_PANDOC+:} false; then :
15378   $as_echo_n "(cached) " >&6
15379 else
15380   case $PANDOC in
15381   [\\/]* | ?:[\\/]*)
15382   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15383   ;;
15384   *)
15385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15386 for as_dir in $PATH
15387 do
15388   IFS=$as_save_IFS
15389   test -z "$as_dir" && as_dir=.
15390     for ac_exec_ext in '' $ac_executable_extensions; do
15391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15392     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15394     break 2
15395   fi
15396 done
15397   done
15398 IFS=$as_save_IFS
15399 
15400   ;;
15401 esac
15402 fi
15403 PANDOC=$ac_cv_path_PANDOC
15404 if test -n "$PANDOC"; then
15405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15406 $as_echo "$PANDOC" >&6; }
15407 else
15408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15409 $as_echo "no" >&6; }
15410 fi
15411 
15412 
15413   test -n "$PANDOC" && break
15414 done
15415 
15416     else
15417       # If it succeeded, then it was overridden by the user. We will use it
15418       # for the tool.
15419 
15420       # First remove it from the list of overridden variables, so we can test
15421       # for unknown variables in the end.
15422       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15423 
15424       # Check if we try to supply an empty value
15425       if test "x$PANDOC" = x; then
15426         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15427 $as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15428         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15429 $as_echo_n "checking for PANDOC... " >&6; }
15430         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15431 $as_echo "disabled" >&6; }
15432       else
15433         # Check if the provided tool contains a complete path.
15434         tool_specified="$PANDOC"
15435         tool_basename="${tool_specified##*/}"
15436         if test "x$tool_basename" = "x$tool_specified"; then
15437           # A command without a complete path is provided, search $PATH.
15438           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15439 $as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15440           # Extract the first word of "$tool_basename", so it can be a program name with args.
15441 set dummy $tool_basename; ac_word=$2
15442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15443 $as_echo_n "checking for $ac_word... " >&6; }
15444 if ${ac_cv_path_PANDOC+:} false; then :
15445   $as_echo_n "(cached) " >&6
15446 else
15447   case $PANDOC in
15448   [\\/]* | ?:[\\/]*)
15449   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15450   ;;
15451   *)
15452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15453 for as_dir in $PATH
15454 do
15455   IFS=$as_save_IFS
15456   test -z "$as_dir" && as_dir=.
15457     for ac_exec_ext in '' $ac_executable_extensions; do
15458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15459     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15461     break 2
15462   fi
15463 done
15464   done
15465 IFS=$as_save_IFS
15466 
15467   ;;
15468 esac
15469 fi
15470 PANDOC=$ac_cv_path_PANDOC
15471 if test -n "$PANDOC"; then
15472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15473 $as_echo "$PANDOC" >&6; }
15474 else
15475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15476 $as_echo "no" >&6; }
15477 fi
15478 
15479 
15480           if test "x$PANDOC" = x; then
15481             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15482           fi
15483         else
15484           # Otherwise we believe it is a complete path. Use it as it is.
15485           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15486 $as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15487           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15488 $as_echo_n "checking for PANDOC... " >&6; }
15489           if test ! -x "$tool_specified"; then
15490             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15491 $as_echo "not found" >&6; }
15492             as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15493           fi
15494           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15495 $as_echo "$tool_specified" >&6; }
15496         fi
15497       fi
15498     fi
15499 
15500   fi
15501 
15502 
15503 
15504 
15505 # Now we can determine OpenJDK build and target platforms. This is required to
15506 # have early on.
15507 # Make sure we can run config.sub.
15508 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15509   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15510 
15511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15512 $as_echo_n "checking build system type... " >&6; }
15513 if ${ac_cv_build+:} false; then :
15514   $as_echo_n "(cached) " >&6
15515 else
15516   ac_build_alias=$build_alias
15517 test "x$ac_build_alias" = x &&
15518   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15519 test "x$ac_build_alias" = x &&
15520   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15521 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15522   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15523 
15524 fi
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15526 $as_echo "$ac_cv_build" >&6; }
15527 case $ac_cv_build in
15528 *-*-*) ;;
15529 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15530 esac
15531 build=$ac_cv_build
15532 ac_save_IFS=$IFS; IFS='-'
15533 set x $ac_cv_build
15534 shift
15535 build_cpu=$1
15536 build_vendor=$2
15537 shift; shift
15538 # Remember, the first character of IFS is used to create $*,
15539 # except with old shells:
15540 build_os=$*
15541 IFS=$ac_save_IFS
15542 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15543 
15544 
15545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15546 $as_echo_n "checking host system type... " >&6; }
15547 if ${ac_cv_host+:} false; then :
15548   $as_echo_n "(cached) " >&6
15549 else
15550   if test "x$host_alias" = x; then
15551   ac_cv_host=$ac_cv_build
15552 else
15553   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15554     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15555 fi
15556 
15557 fi
15558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15559 $as_echo "$ac_cv_host" >&6; }
15560 case $ac_cv_host in
15561 *-*-*) ;;
15562 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15563 esac
15564 host=$ac_cv_host
15565 ac_save_IFS=$IFS; IFS='-'
15566 set x $ac_cv_host
15567 shift
15568 host_cpu=$1
15569 host_vendor=$2
15570 shift; shift
15571 # Remember, the first character of IFS is used to create $*,
15572 # except with old shells:
15573 host_os=$*
15574 IFS=$ac_save_IFS
15575 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15576 
15577 
15578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15579 $as_echo_n "checking target system type... " >&6; }
15580 if ${ac_cv_target+:} false; then :
15581   $as_echo_n "(cached) " >&6
15582 else
15583   if test "x$target_alias" = x; then
15584   ac_cv_target=$ac_cv_host
15585 else
15586   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15587     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15588 fi
15589 
15590 fi
15591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15592 $as_echo "$ac_cv_target" >&6; }
15593 case $ac_cv_target in
15594 *-*-*) ;;
15595 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15596 esac
15597 target=$ac_cv_target
15598 ac_save_IFS=$IFS; IFS='-'
15599 set x $ac_cv_target
15600 shift
15601 target_cpu=$1
15602 target_vendor=$2
15603 shift; shift
15604 # Remember, the first character of IFS is used to create $*,
15605 # except with old shells:
15606 target_os=$*
15607 IFS=$ac_save_IFS
15608 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15609 
15610 
15611 # The aliases save the names the user supplied, while $host etc.
15612 # will get canonicalized.
15613 test -n "$target_alias" &&
15614   test "$program_prefix$program_suffix$program_transform_name" = \
15615     NONENONEs,x,x, &&
15616   program_prefix=${target_alias}-
15617 
15618   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15619   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15620   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15621   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15622   # to use the configure naming style.
15623 
15624 
15625 
15626 
15627 
15628   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15629   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15630   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15631   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15632   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15633   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15634 
15635 
15636 
15637   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15638 
15639   case "$build_os" in
15640     *linux*)
15641       VAR_OS=linux
15642       VAR_OS_TYPE=unix
15643       ;;
15644     *solaris*)
15645       VAR_OS=solaris
15646       VAR_OS_TYPE=unix
15647       ;;
15648     *darwin*)
15649       VAR_OS=macosx
15650       VAR_OS_TYPE=unix
15651       ;;
15652     *bsd*)
15653       VAR_OS=bsd
15654       VAR_OS_TYPE=unix
15655       ;;
15656     *cygwin*)
15657       VAR_OS=windows
15658       VAR_OS_ENV=windows.cygwin
15659       ;;
15660     *mingw*)
15661       VAR_OS=windows
15662       VAR_OS_ENV=windows.msys
15663       ;;
15664     *aix*)
15665       VAR_OS=aix
15666       VAR_OS_TYPE=unix
15667       ;;
15668     *)
15669       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15670       ;;
15671   esac
15672 
15673 
15674   # First argument is the cpu name from the trip/quad
15675   case "$build_cpu" in
15676     x86_64)
15677       VAR_CPU=x86_64
15678       VAR_CPU_ARCH=x86
15679       VAR_CPU_BITS=64
15680       VAR_CPU_ENDIAN=little
15681       ;;
15682     i?86)
15683       VAR_CPU=x86
15684       VAR_CPU_ARCH=x86
15685       VAR_CPU_BITS=32
15686       VAR_CPU_ENDIAN=little
15687       ;;
15688     alpha*)
15689       VAR_CPU=alpha
15690       VAR_CPU_ARCH=alpha
15691       VAR_CPU_BITS=64
15692       VAR_CPU_ENDIAN=little
15693       ;;
15694     arm*)
15695       VAR_CPU=arm
15696       VAR_CPU_ARCH=arm
15697       VAR_CPU_BITS=32
15698       VAR_CPU_ENDIAN=little
15699       ;;
15700     aarch64)
15701       VAR_CPU=aarch64
15702       VAR_CPU_ARCH=aarch64
15703       VAR_CPU_BITS=64
15704       VAR_CPU_ENDIAN=little
15705       ;;
15706     m68k)
15707       VAR_CPU=m68k
15708       VAR_CPU_ARCH=m68k
15709       VAR_CPU_BITS=32
15710       VAR_CPU_ENDIAN=big
15711       ;;
15712     mips)
15713       VAR_CPU=mips
15714       VAR_CPU_ARCH=mips
15715       VAR_CPU_BITS=32
15716       VAR_CPU_ENDIAN=big
15717       ;;
15718     mipsel)
15719       VAR_CPU=mipsel
15720       VAR_CPU_ARCH=mipsel
15721       VAR_CPU_BITS=32
15722       VAR_CPU_ENDIAN=little
15723       ;;
15724     mips64)
15725       VAR_CPU=mips64
15726       VAR_CPU_ARCH=mips64
15727       VAR_CPU_BITS=64
15728       VAR_CPU_ENDIAN=big
15729       ;;
15730     mips64el)
15731       VAR_CPU=mips64el
15732       VAR_CPU_ARCH=mips64el
15733       VAR_CPU_BITS=64
15734       VAR_CPU_ENDIAN=little
15735       ;;
15736     powerpc)
15737       VAR_CPU=ppc
15738       VAR_CPU_ARCH=ppc
15739       VAR_CPU_BITS=32
15740       VAR_CPU_ENDIAN=big
15741       ;;
15742     powerpc64)
15743       VAR_CPU=ppc64
15744       VAR_CPU_ARCH=ppc
15745       VAR_CPU_BITS=64
15746       VAR_CPU_ENDIAN=big
15747       ;;
15748     powerpc64le)
15749       VAR_CPU=ppc64le
15750       VAR_CPU_ARCH=ppc
15751       VAR_CPU_BITS=64
15752       VAR_CPU_ENDIAN=little
15753       ;;
15754     s390)
15755       VAR_CPU=s390
15756       VAR_CPU_ARCH=s390
15757       VAR_CPU_BITS=32
15758       VAR_CPU_ENDIAN=big
15759       ;;
15760     s390x)
15761       VAR_CPU=s390x
15762       VAR_CPU_ARCH=s390
15763       VAR_CPU_BITS=64
15764       VAR_CPU_ENDIAN=big
15765       ;;
15766     sh*eb)
15767       VAR_CPU=sh
15768       VAR_CPU_ARCH=sh
15769       VAR_CPU_BITS=32
15770       VAR_CPU_ENDIAN=big
15771       ;;
15772     sh*)
15773       VAR_CPU=sh
15774       VAR_CPU_ARCH=sh
15775       VAR_CPU_BITS=32
15776       VAR_CPU_ENDIAN=little
15777       ;;
15778     sparc)
15779       VAR_CPU=sparc
15780       VAR_CPU_ARCH=sparc
15781       VAR_CPU_BITS=32
15782       VAR_CPU_ENDIAN=big
15783       ;;
15784     sparcv9|sparc64)
15785       VAR_CPU=sparcv9
15786       VAR_CPU_ARCH=sparc
15787       VAR_CPU_BITS=64
15788       VAR_CPU_ENDIAN=big
15789       ;;
15790     *)
15791       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15792       ;;
15793   esac
15794 
15795   # ..and setup our own variables. (Do this explicitly to facilitate searching)
15796   OPENJDK_BUILD_OS="$VAR_OS"
15797   if test "x$VAR_OS_TYPE" != x; then
15798     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15799   else
15800     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15801   fi
15802   if test "x$VAR_OS_ENV" != x; then
15803     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15804   else
15805     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15806   fi
15807   OPENJDK_BUILD_CPU="$VAR_CPU"
15808   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15809   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15810   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15811 
15812 
15813 
15814 
15815 
15816 
15817 
15818 
15819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15820 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15822 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15823 
15824   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15825 
15826   case "$host_os" in
15827     *linux*)
15828       VAR_OS=linux
15829       VAR_OS_TYPE=unix
15830       ;;
15831     *solaris*)
15832       VAR_OS=solaris
15833       VAR_OS_TYPE=unix
15834       ;;
15835     *darwin*)
15836       VAR_OS=macosx
15837       VAR_OS_TYPE=unix
15838       ;;
15839     *bsd*)
15840       VAR_OS=bsd
15841       VAR_OS_TYPE=unix
15842       ;;
15843     *cygwin*)
15844       VAR_OS=windows
15845       VAR_OS_ENV=windows.cygwin
15846       ;;
15847     *mingw*)
15848       VAR_OS=windows
15849       VAR_OS_ENV=windows.msys
15850       ;;
15851     *aix*)
15852       VAR_OS=aix
15853       VAR_OS_TYPE=unix
15854       ;;
15855     *)
15856       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15857       ;;
15858   esac
15859 
15860 
15861   # First argument is the cpu name from the trip/quad
15862   case "$host_cpu" in
15863     x86_64)
15864       VAR_CPU=x86_64
15865       VAR_CPU_ARCH=x86
15866       VAR_CPU_BITS=64
15867       VAR_CPU_ENDIAN=little
15868       ;;
15869     i?86)
15870       VAR_CPU=x86
15871       VAR_CPU_ARCH=x86
15872       VAR_CPU_BITS=32
15873       VAR_CPU_ENDIAN=little
15874       ;;
15875     alpha*)
15876       VAR_CPU=alpha
15877       VAR_CPU_ARCH=alpha
15878       VAR_CPU_BITS=64
15879       VAR_CPU_ENDIAN=little
15880       ;;
15881     arm*)
15882       VAR_CPU=arm
15883       VAR_CPU_ARCH=arm
15884       VAR_CPU_BITS=32
15885       VAR_CPU_ENDIAN=little
15886       ;;
15887     aarch64)
15888       VAR_CPU=aarch64
15889       VAR_CPU_ARCH=aarch64
15890       VAR_CPU_BITS=64
15891       VAR_CPU_ENDIAN=little
15892       ;;
15893     m68k)
15894       VAR_CPU=m68k
15895       VAR_CPU_ARCH=m68k
15896       VAR_CPU_BITS=32
15897       VAR_CPU_ENDIAN=big
15898       ;;
15899     mips)
15900       VAR_CPU=mips
15901       VAR_CPU_ARCH=mips
15902       VAR_CPU_BITS=32
15903       VAR_CPU_ENDIAN=big
15904       ;;
15905     mipsel)
15906       VAR_CPU=mipsel
15907       VAR_CPU_ARCH=mipsel
15908       VAR_CPU_BITS=32
15909       VAR_CPU_ENDIAN=little
15910       ;;
15911     mips64)
15912       VAR_CPU=mips64
15913       VAR_CPU_ARCH=mips64
15914       VAR_CPU_BITS=64
15915       VAR_CPU_ENDIAN=big
15916       ;;
15917     mips64el)
15918       VAR_CPU=mips64el
15919       VAR_CPU_ARCH=mips64el
15920       VAR_CPU_BITS=64
15921       VAR_CPU_ENDIAN=little
15922       ;;
15923     powerpc)
15924       VAR_CPU=ppc
15925       VAR_CPU_ARCH=ppc
15926       VAR_CPU_BITS=32
15927       VAR_CPU_ENDIAN=big
15928       ;;
15929     powerpc64)
15930       VAR_CPU=ppc64
15931       VAR_CPU_ARCH=ppc
15932       VAR_CPU_BITS=64
15933       VAR_CPU_ENDIAN=big
15934       ;;
15935     powerpc64le)
15936       VAR_CPU=ppc64le
15937       VAR_CPU_ARCH=ppc
15938       VAR_CPU_BITS=64
15939       VAR_CPU_ENDIAN=little
15940       ;;
15941     s390)
15942       VAR_CPU=s390
15943       VAR_CPU_ARCH=s390
15944       VAR_CPU_BITS=32
15945       VAR_CPU_ENDIAN=big
15946       ;;
15947     s390x)
15948       VAR_CPU=s390x
15949       VAR_CPU_ARCH=s390
15950       VAR_CPU_BITS=64
15951       VAR_CPU_ENDIAN=big
15952       ;;
15953     sh*eb)
15954       VAR_CPU=sh
15955       VAR_CPU_ARCH=sh
15956       VAR_CPU_BITS=32
15957       VAR_CPU_ENDIAN=big
15958       ;;
15959     sh*)
15960       VAR_CPU=sh
15961       VAR_CPU_ARCH=sh
15962       VAR_CPU_BITS=32
15963       VAR_CPU_ENDIAN=little
15964       ;;
15965     sparc)
15966       VAR_CPU=sparc
15967       VAR_CPU_ARCH=sparc
15968       VAR_CPU_BITS=32
15969       VAR_CPU_ENDIAN=big
15970       ;;
15971     sparcv9|sparc64)
15972       VAR_CPU=sparcv9
15973       VAR_CPU_ARCH=sparc
15974       VAR_CPU_BITS=64
15975       VAR_CPU_ENDIAN=big
15976       ;;
15977     *)
15978       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15979       ;;
15980   esac
15981 
15982   # ... and setup our own variables. (Do this explicitly to facilitate searching)
15983   OPENJDK_TARGET_OS="$VAR_OS"
15984   if test "x$VAR_OS_TYPE" != x; then
15985     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15986   else
15987     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15988   fi
15989   if test "x$VAR_OS_ENV" != x; then
15990     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15991   else
15992     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15993   fi
15994   OPENJDK_TARGET_CPU="$VAR_CPU"
15995   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15996   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15997   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15998 
15999 
16000 
16001 
16002 
16003 
16004 
16005 
16006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
16007 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
16008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
16009 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
16010 
16011 
16012 
16013 # Check whether --with-target-bits was given.
16014 if test "${with_target_bits+set}" = set; then :
16015   withval=$with_target_bits;
16016 fi
16017 
16018 
16019   # We have three types of compiles:
16020   # native  == normal compilation, target system == build system
16021   # cross   == traditional cross compilation, target system != build system; special toolchain needed
16022   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
16023   #
16024   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
16025     # We're doing a proper cross-compilation
16026     COMPILE_TYPE="cross"
16027   else
16028     COMPILE_TYPE="native"
16029   fi
16030 
16031   if test "x$with_target_bits" != x; then
16032     if test "x$COMPILE_TYPE" = "xcross"; then
16033       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16034     fi
16035 
16036     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16037       # A reduced build is requested
16038       COMPILE_TYPE="reduced"
16039       OPENJDK_TARGET_CPU_BITS=32
16040       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16041         OPENJDK_TARGET_CPU=x86
16042       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16043         OPENJDK_TARGET_CPU=sparc
16044       else
16045         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16046       fi
16047     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16048       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
16049     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16050       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16051 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16052     else
16053       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16054     fi
16055   fi
16056 
16057 
16058   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16059 $as_echo_n "checking compilation type... " >&6; }
16060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16061 $as_echo "$COMPILE_TYPE" >&6; }
16062 
16063 
16064   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16065     OPENJDK_MODULE_TARGET_OS_NAME="macos"
16066   else
16067     OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16068   fi
16069 
16070   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16071     OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16072   else
16073     OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16074   fi
16075 
16076   OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16077 
16078 
16079 
16080   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16081     RELEASE_FILE_OS_NAME=SunOS
16082   fi
16083   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16084     RELEASE_FILE_OS_NAME=Linux
16085   fi
16086   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16087     RELEASE_FILE_OS_NAME=Windows
16088   fi
16089   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16090     RELEASE_FILE_OS_NAME="Darwin"
16091   fi
16092   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16093     RELEASE_FILE_OS_NAME="AIX"
16094   fi
16095   RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16096 
16097 
16098 
16099 
16100 
16101 
16102   # Also store the legacy naming of the cpu.
16103   # Ie i586 and amd64 instead of x86 and x86_64
16104   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16105   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16106     OPENJDK_TARGET_CPU_LEGACY="i586"
16107   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16108     # On all platforms except MacOSX replace x86_64 with amd64.
16109     OPENJDK_TARGET_CPU_LEGACY="amd64"
16110   elif test "x$OPENJDK_TARGET_CPU" = xalpha; then
16111     # Avoid name collisions with variables named alpha
16112     OPENJDK_TARGET_CPU_LEGACY="_alpha_"
16113   elif test "x$OPENJDK_TARGET_CPU" = xsh; then
16114     # Avoid name collisions with variables named sh
16115     OPENJDK_TARGET_CPU_LEGACY="_sh_"
16116   fi
16117 
16118 
16119   # And the second legacy naming of the cpu.
16120   # Ie i386 and amd64 instead of x86 and x86_64.
16121   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16122   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16123     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16124   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16125     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16126   fi
16127 
16128 
16129   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16130   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16131   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16132   OPENJDK_TARGET_CPU_ISADIR=""
16133   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16134     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16135       OPENJDK_TARGET_CPU_ISADIR="/amd64"
16136     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16137       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16138     fi
16139   fi
16140 
16141 
16142   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16143   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16144   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16145     # On linux only, we replace x86 with i386.
16146     OPENJDK_TARGET_CPU_OSARCH="i386"
16147   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16148     # On all platforms except macosx, we replace x86_64 with amd64.
16149     OPENJDK_TARGET_CPU_OSARCH="amd64"
16150   fi
16151 
16152 
16153   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16154   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16155     OPENJDK_TARGET_CPU_JLI="i386"
16156   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16157     # On all platforms except macosx, we replace x86_64 with amd64.
16158     OPENJDK_TARGET_CPU_JLI="amd64"
16159   fi
16160 
16161   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16162       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16163   else
16164       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16165   fi
16166 
16167 
16168   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16169   # Macosx is osx and x86_64 is x64
16170   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16171     OPENJDK_TARGET_OS_BUNDLE="osx"
16172   else
16173     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16174   fi
16175   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16176     OPENJDK_TARGET_CPU_BUNDLE="x64"
16177   else
16178     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16179   fi
16180   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16181 
16182 
16183   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16184     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16185     # unpack200.exe. This variable is used in
16186     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16187     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16188       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16189     fi
16190   fi
16191 
16192   if test "x$COMPILE_TYPE" = "xcross"; then
16193     # FIXME: ... or should this include reduced builds..?
16194     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16195   else
16196     DEFINE_CROSS_COMPILE_ARCH=""
16197   fi
16198 
16199 
16200   # Convert openjdk platform names to hotspot names
16201 
16202   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16203   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16204     HOTSPOT_TARGET_OS=bsd
16205   fi
16206 
16207 
16208   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16209   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16210     HOTSPOT_TARGET_OS_TYPE=posix
16211   fi
16212 
16213 
16214   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16215   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16216     HOTSPOT_TARGET_CPU=x86_32
16217   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16218     HOTSPOT_TARGET_CPU=sparc
16219   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16220     HOTSPOT_TARGET_CPU=ppc_64
16221   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16222     HOTSPOT_TARGET_CPU=ppc_64
16223   fi
16224 
16225 
16226   # This is identical with OPENJDK_*, but define anyway for consistency.
16227   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16228 
16229 
16230   # Setup HOTSPOT_TARGET_CPU_DEFINE
16231   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16232     HOTSPOT_TARGET_CPU_DEFINE=IA32
16233   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16234     HOTSPOT_TARGET_CPU_DEFINE=AMD64
16235   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16236     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16237   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16238     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16239   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16240     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16241   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16242     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16243 
16244   # The cpu defines below are for zero, we don't support them directly.
16245   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16246     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16247   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16248     HOTSPOT_TARGET_CPU_DEFINE=PPC32
16249   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16250     HOTSPOT_TARGET_CPU_DEFINE=S390
16251   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16252     HOTSPOT_TARGET_CPU_DEFINE=S390
16253   elif test "x$OPENJDK_TARGET_CPU" != x; then
16254     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16255   fi
16256 
16257 
16258 
16259 
16260   # Also store the legacy naming of the cpu.
16261   # Ie i586 and amd64 instead of x86 and x86_64
16262   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16263   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16264     OPENJDK_BUILD_CPU_LEGACY="i586"
16265   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16266     # On all platforms except MacOSX replace x86_64 with amd64.
16267     OPENJDK_BUILD_CPU_LEGACY="amd64"
16268   elif test "x$OPENJDK_BUILD_CPU" = xalpha; then
16269     # Avoid name collisions with variables named alpha
16270     OPENJDK_BUILD_CPU_LEGACY="_alpha_"
16271   elif test "x$OPENJDK_BUILD_CPU" = xsh; then
16272     # Avoid name collisions with variables named sh
16273     OPENJDK_BUILD_CPU_LEGACY="_sh_"
16274   fi
16275 
16276 
16277   # And the second legacy naming of the cpu.
16278   # Ie i386 and amd64 instead of x86 and x86_64.
16279   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16280   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16281     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16282   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16283     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16284   fi
16285 
16286 
16287   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16288   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16289   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16290   OPENJDK_BUILD_CPU_ISADIR=""
16291   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16292     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16293       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16294     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16295       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16296     fi
16297   fi
16298 
16299 
16300   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16301   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16302   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16303     # On linux only, we replace x86 with i386.
16304     OPENJDK_BUILD_CPU_OSARCH="i386"
16305   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16306     # On all platforms except macosx, we replace x86_64 with amd64.
16307     OPENJDK_BUILD_CPU_OSARCH="amd64"
16308   fi
16309 
16310 
16311   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16312   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16313     OPENJDK_BUILD_CPU_JLI="i386"
16314   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16315     # On all platforms except macosx, we replace x86_64 with amd64.
16316     OPENJDK_BUILD_CPU_JLI="amd64"
16317   fi
16318 
16319   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16320       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16321   else
16322       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16323   fi
16324 
16325 
16326   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16327   # Macosx is osx and x86_64 is x64
16328   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16329     OPENJDK_BUILD_OS_BUNDLE="osx"
16330   else
16331     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16332   fi
16333   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16334     OPENJDK_BUILD_CPU_BUNDLE="x64"
16335   else
16336     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16337   fi
16338   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16339 
16340 
16341   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16342     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16343     # unpack200.exe. This variable is used in
16344     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16345     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16346       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16347     fi
16348   fi
16349 
16350   if test "x$COMPILE_TYPE" = "xcross"; then
16351     # FIXME: ... or should this include reduced builds..?
16352     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16353   else
16354     DEFINE_CROSS_COMPILE_ARCH=""
16355   fi
16356 
16357 
16358   # Convert openjdk platform names to hotspot names
16359 
16360   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16361   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16362     HOTSPOT_BUILD_OS=bsd
16363   fi
16364 
16365 
16366   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16367   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16368     HOTSPOT_BUILD_OS_TYPE=posix
16369   fi
16370 
16371 
16372   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16373   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16374     HOTSPOT_BUILD_CPU=x86_32
16375   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16376     HOTSPOT_BUILD_CPU=sparc
16377   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16378     HOTSPOT_BUILD_CPU=ppc_64
16379   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16380     HOTSPOT_BUILD_CPU=ppc_64
16381   fi
16382 
16383 
16384   # This is identical with OPENJDK_*, but define anyway for consistency.
16385   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16386 
16387 
16388   # Setup HOTSPOT_BUILD_CPU_DEFINE
16389   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16390     HOTSPOT_BUILD_CPU_DEFINE=IA32
16391   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16392     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16393   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16394     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16395   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16396     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16397   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16398     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16399   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16400     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16401 
16402   # The cpu defines below are for zero, we don't support them directly.
16403   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16404     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16405   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16406     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16407   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16408     HOTSPOT_BUILD_CPU_DEFINE=S390
16409   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16410     HOTSPOT_BUILD_CPU_DEFINE=S390
16411   elif test "x$OPENJDK_BUILD_CPU" != x; then
16412     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16413   fi
16414 
16415 
16416 
16417 
16418 
16419 
16420 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16421 
16422   # Save the current directory this script was started from
16423   CURDIR="$PWD"
16424 
16425   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16426   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16427   # was not available at that time.
16428   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16429   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16430     ORIGINAL_PATH="$REWRITTEN_PATH"
16431     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16432 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16433   fi
16434 
16435   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16436     PATH_SEP=";"
16437 
16438   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16439   if test $SRC_ROOT_LENGTH -gt 100; then
16440     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16441   fi
16442 
16443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16444     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16445 $as_echo_n "checking cygwin release... " >&6; }
16446     CYGWIN_VERSION=`$UNAME -r`
16447     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16448 $as_echo "$CYGWIN_VERSION" >&6; }
16449     WINDOWS_ENV_VENDOR='cygwin'
16450     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16451 
16452     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16453     if test "x$CYGWIN_VERSION_OLD" != x; then
16454       { $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
16455 $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;}
16456       as_fn_error $? "Cannot continue" "$LINENO" 5
16457     fi
16458     if test "x$CYGPATH" = x; then
16459       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16460     fi
16461     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16462 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16463     # The cmd output ends with Windows line endings (CR/LF)
16464     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16465     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16466     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16467     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16468 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16469     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16470     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16471     if test "x$test_cygdrive_prefix" = x; then
16472       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16473     fi
16474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16475     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16476 $as_echo_n "checking msys release... " >&6; }
16477     MSYS_VERSION=`$UNAME -r`
16478     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16479 $as_echo "$MSYS_VERSION" >&6; }
16480 
16481     WINDOWS_ENV_VENDOR='msys'
16482     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16483 
16484     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16485 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16486     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16487     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16488 
16489   windows_path="$MSYS_ROOT_PATH"
16490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16491     unix_path=`$CYGPATH -u "$windows_path"`
16492     MSYS_ROOT_PATH="$unix_path"
16493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16494     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16495     MSYS_ROOT_PATH="$unix_path"
16496   fi
16497 
16498     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16499 $as_echo "$MSYS_ROOT_PATH" >&6; }
16500     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16501   else
16502     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16503   fi
16504 
16505   # Test if windows or unix (cygwin/msys) find is first in path.
16506   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16507 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16508   FIND_BINARY_OUTPUT=`find --version 2>&1`
16509   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16510     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16511 $as_echo "unix style" >&6; }
16512   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16514 $as_echo "Windows" >&6; }
16515     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16516 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16517     { $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
16518 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16519     as_fn_error $? "Cannot continue" "$LINENO" 5
16520   else
16521     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16522 $as_echo "unknown" >&6; }
16523     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16524 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16525   fi
16526 
16527   else
16528     PATH_SEP=":"
16529   fi
16530 
16531 
16532   # We get the top-level directory from the supporting wrappers.
16533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16534 $as_echo_n "checking for top-level directory... " >&6; }
16535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16536 $as_echo "$TOPDIR" >&6; }
16537 
16538 
16539   # Save the original version of TOPDIR for string comparisons
16540   ORIGINAL_TOPDIR="$TOPDIR"
16541 
16542 
16543   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16544 
16545   # Only process if variable expands to non-empty
16546 
16547   if test "x$CURDIR" != x; then
16548     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16549 
16550   # Input might be given as Windows format, start by converting to
16551   # unix format.
16552   path="$CURDIR"
16553   new_path=`$CYGPATH -u "$path"`
16554 
16555   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16556   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16557   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16558   # "foo.exe" is OK but "foo" is an error.
16559   #
16560   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16561   # It is also a way to make sure we got the proper file name for the real test later on.
16562   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16563   if test "x$test_shortpath" = x; then
16564     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16565 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16566     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16567   fi
16568 
16569   # Call helper function which possibly converts this using DOS-style short mode.
16570   # If so, the updated path is stored in $new_path.
16571 
16572   input_path="$new_path"
16573   # Check if we need to convert this using DOS-style short mode. If the path
16574   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16575   # take no chances and rewrite it.
16576   # Note: m4 eats our [], so we need to use [ and ] instead.
16577   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16578   if test "x$has_forbidden_chars" != x; then
16579     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16580     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16581     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16582     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16583       # Going to short mode and back again did indeed matter. Since short mode is
16584       # case insensitive, let's make it lowercase to improve readability.
16585       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16586       # Now convert it back to Unix-style (cygpath)
16587       input_path=`$CYGPATH -u "$shortmode_path"`
16588       new_path="$input_path"
16589     fi
16590   fi
16591 
16592   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16593   if test "x$test_cygdrive_prefix" = x; then
16594     # As a simple fix, exclude /usr/bin since it's not a real path.
16595     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16596       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16597       # a path prefixed by /cygdrive for fixpath to work.
16598       new_path="$CYGWIN_ROOT_PATH$input_path"
16599     fi
16600   fi
16601 
16602 
16603   if test "x$path" != "x$new_path"; then
16604     CURDIR="$new_path"
16605     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16606 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16607   fi
16608 
16609     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16610 
16611   path="$CURDIR"
16612   has_colon=`$ECHO $path | $GREP ^.:`
16613   new_path="$path"
16614   if test "x$has_colon" = x; then
16615     # Not in mixed or Windows style, start by that.
16616     new_path=`cmd //c echo $path`
16617   fi
16618 
16619 
16620   input_path="$new_path"
16621   # Check if we need to convert this using DOS-style short mode. If the path
16622   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16623   # take no chances and rewrite it.
16624   # Note: m4 eats our [], so we need to use [ and ] instead.
16625   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16626   if test "x$has_forbidden_chars" != x; then
16627     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16628     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16629   fi
16630 
16631 
16632   windows_path="$new_path"
16633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16634     unix_path=`$CYGPATH -u "$windows_path"`
16635     new_path="$unix_path"
16636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16638     new_path="$unix_path"
16639   fi
16640 
16641   if test "x$path" != "x$new_path"; then
16642     CURDIR="$new_path"
16643     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16644 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16645   fi
16646 
16647   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16648   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16649 
16650     else
16651       # We're on a unix platform. Hooray! :)
16652       path="$CURDIR"
16653       has_space=`$ECHO "$path" | $GREP " "`
16654       if test "x$has_space" != x; then
16655         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16656 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16657         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16658       fi
16659 
16660       # Use eval to expand a potential ~
16661       eval path="$path"
16662       if test ! -f "$path" && test ! -d "$path"; then
16663         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16664       fi
16665 
16666       if test -d "$path"; then
16667         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16668       else
16669         dir="`$DIRNAME "$path"`"
16670         base="`$BASENAME "$path"`"
16671         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16672       fi
16673     fi
16674   fi
16675 
16676 
16677   # Only process if variable expands to non-empty
16678 
16679   if test "x$TOPDIR" != x; then
16680     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16681 
16682   # Input might be given as Windows format, start by converting to
16683   # unix format.
16684   path="$TOPDIR"
16685   new_path=`$CYGPATH -u "$path"`
16686 
16687   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16688   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16689   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16690   # "foo.exe" is OK but "foo" is an error.
16691   #
16692   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16693   # It is also a way to make sure we got the proper file name for the real test later on.
16694   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16695   if test "x$test_shortpath" = x; then
16696     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16697 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16698     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16699   fi
16700 
16701   # Call helper function which possibly converts this using DOS-style short mode.
16702   # If so, the updated path is stored in $new_path.
16703 
16704   input_path="$new_path"
16705   # Check if we need to convert this using DOS-style short mode. If the path
16706   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16707   # take no chances and rewrite it.
16708   # Note: m4 eats our [], so we need to use [ and ] instead.
16709   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16710   if test "x$has_forbidden_chars" != x; then
16711     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16712     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16713     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16714     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16715       # Going to short mode and back again did indeed matter. Since short mode is
16716       # case insensitive, let's make it lowercase to improve readability.
16717       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16718       # Now convert it back to Unix-style (cygpath)
16719       input_path=`$CYGPATH -u "$shortmode_path"`
16720       new_path="$input_path"
16721     fi
16722   fi
16723 
16724   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16725   if test "x$test_cygdrive_prefix" = x; then
16726     # As a simple fix, exclude /usr/bin since it's not a real path.
16727     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16728       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16729       # a path prefixed by /cygdrive for fixpath to work.
16730       new_path="$CYGWIN_ROOT_PATH$input_path"
16731     fi
16732   fi
16733 
16734 
16735   if test "x$path" != "x$new_path"; then
16736     TOPDIR="$new_path"
16737     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16738 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16739   fi
16740 
16741     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16742 
16743   path="$TOPDIR"
16744   has_colon=`$ECHO $path | $GREP ^.:`
16745   new_path="$path"
16746   if test "x$has_colon" = x; then
16747     # Not in mixed or Windows style, start by that.
16748     new_path=`cmd //c echo $path`
16749   fi
16750 
16751 
16752   input_path="$new_path"
16753   # Check if we need to convert this using DOS-style short mode. If the path
16754   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16755   # take no chances and rewrite it.
16756   # Note: m4 eats our [], so we need to use [ and ] instead.
16757   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16758   if test "x$has_forbidden_chars" != x; then
16759     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16760     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16761   fi
16762 
16763 
16764   windows_path="$new_path"
16765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16766     unix_path=`$CYGPATH -u "$windows_path"`
16767     new_path="$unix_path"
16768   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16769     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16770     new_path="$unix_path"
16771   fi
16772 
16773   if test "x$path" != "x$new_path"; then
16774     TOPDIR="$new_path"
16775     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16776 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16777   fi
16778 
16779   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16780   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16781 
16782     else
16783       # We're on a unix platform. Hooray! :)
16784       path="$TOPDIR"
16785       has_space=`$ECHO "$path" | $GREP " "`
16786       if test "x$has_space" != x; then
16787         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16788 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16789         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16790       fi
16791 
16792       # Use eval to expand a potential ~
16793       eval path="$path"
16794       if test ! -f "$path" && test ! -d "$path"; then
16795         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16796       fi
16797 
16798       if test -d "$path"; then
16799         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16800       else
16801         dir="`$DIRNAME "$path"`"
16802         base="`$BASENAME "$path"`"
16803         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16804       fi
16805     fi
16806   fi
16807 
16808 
16809   # Calculate a canonical version of TOPDIR for string comparisons
16810   CANONICAL_TOPDIR=$TOPDIR
16811 
16812   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16813     # Follow a chain of symbolic links. Use readlink
16814     # where it exists, else fall back to horribly
16815     # complicated shell code.
16816     if test "x$READLINK_TESTED" != yes; then
16817       # On MacOSX there is a readlink tool with a different
16818       # purpose than the GNU readlink tool. Check the found readlink.
16819       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16820       if test "x$ISGNU" = x; then
16821         # A readlink that we do not know how to use.
16822         # Are there other non-GNU readlinks out there?
16823         READLINK_TESTED=yes
16824         READLINK=
16825       fi
16826     fi
16827 
16828     if test "x$READLINK" != x; then
16829       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16830     else
16831       # Save the current directory for restoring afterwards
16832       STARTDIR=$PWD
16833       COUNTER=0
16834       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16835       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16836       cd $sym_link_dir
16837       # Use -P flag to resolve symlinks in directories.
16838       cd `$THEPWDCMD -P`
16839       sym_link_dir=`$THEPWDCMD -P`
16840       # Resolve file symlinks
16841       while test $COUNTER -lt 20; do
16842         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16843         if test "x$ISLINK" == x; then
16844           # This is not a symbolic link! We are done!
16845           break
16846         fi
16847         # Again resolve directory symlinks since the target of the just found
16848         # link could be in a different directory
16849         cd `$DIRNAME $ISLINK`
16850         sym_link_dir=`$THEPWDCMD -P`
16851         sym_link_file=`$BASENAME $ISLINK`
16852         let COUNTER=COUNTER+1
16853       done
16854       cd $STARTDIR
16855       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16856     fi
16857   fi
16858 
16859 
16860 
16861   # Locate the directory of this script.
16862   AUTOCONF_DIR=$TOPDIR/make/autoconf
16863 
16864   # Setup username (for use in adhoc version strings etc)
16865   # Outer [ ] to quote m4.
16866    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16867 
16868 
16869 
16870 # Check if it's a pure open build or if custom sources are to be used.
16871 
16872   # Check whether --enable-openjdk-only was given.
16873 if test "${enable_openjdk_only+set}" = set; then :
16874   enableval=$enable_openjdk_only;
16875 else
16876   enable_openjdk_only="no"
16877 fi
16878 
16879 
16880   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16881 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16883 $as_echo "$enable_openjdk_only" >&6; }
16884   if test "x$enable_openjdk_only" = "xyes"; then
16885     SUPPRESS_CUSTOM_EXTENSIONS="true"
16886   elif test "x$enable_openjdk_only" = "xno"; then
16887     SUPPRESS_CUSTOM_EXTENSIONS="false"
16888   else
16889     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16890   fi
16891 
16892   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16893   # the IncludeCustomExtension macro.
16894 
16895 
16896 # Check whether --with-custom-make-dir was given.
16897 if test "${with_custom_make_dir+set}" = set; then :
16898   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
16899 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16900 fi
16901 
16902 
16903 
16904 
16905 # These are needed to be able to create a configuration name (and thus the output directory)
16906 
16907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16908 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16909 
16910 # Check whether --with-jdk-variant was given.
16911 if test "${with_jdk_variant+set}" = set; then :
16912   withval=$with_jdk_variant;
16913 fi
16914 
16915 
16916   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16917     JDK_VARIANT="normal"
16918   else
16919     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16920   fi
16921 
16922 
16923 
16924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16925 $as_echo "$JDK_VARIANT" >&6; }
16926 
16927 
16928   DEBUG_LEVEL="release"
16929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16930 $as_echo_n "checking which debug level to use... " >&6; }
16931   # Check whether --enable-debug was given.
16932 if test "${enable_debug+set}" = set; then :
16933   enableval=$enable_debug;
16934         ENABLE_DEBUG="${enableval}"
16935         DEBUG_LEVEL="fastdebug"
16936 
16937 else
16938   ENABLE_DEBUG="no"
16939 fi
16940 
16941 
16942 
16943 # Check whether --with-debug-level was given.
16944 if test "${with_debug_level+set}" = set; then :
16945   withval=$with_debug_level;
16946         DEBUG_LEVEL="${withval}"
16947         if test "x$ENABLE_DEBUG" = xyes; then
16948           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16949         fi
16950 
16951 fi
16952 
16953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16954 $as_echo "$DEBUG_LEVEL" >&6; }
16955 
16956   if test "x$DEBUG_LEVEL" != xrelease && \
16957       test "x$DEBUG_LEVEL" != xoptimized && \
16958       test "x$DEBUG_LEVEL" != xfastdebug && \
16959       test "x$DEBUG_LEVEL" != xslowdebug; then
16960     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16961   fi
16962 
16963   # Translate DEBUG_LEVEL to debug level used by Hotspot
16964   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16965   if test "x$DEBUG_LEVEL" = xrelease; then
16966     HOTSPOT_DEBUG_LEVEL="product"
16967   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16968     HOTSPOT_DEBUG_LEVEL="debug"
16969   fi
16970 
16971   if test "x$DEBUG_LEVEL" = xoptimized; then
16972     # The debug level 'optimized' is a little special because it is currently only
16973     # applicable to the HotSpot build where it means to build a completely
16974     # optimized version of the VM without any debugging code (like for the
16975     # 'release' debug level which is called 'product' in the HotSpot build) but
16976     # with the exception that it can contain additional code which is otherwise
16977     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16978     # test new and/or experimental features which are not intended for customer
16979     # shipment. Because these new features need to be tested and benchmarked in
16980     # real world scenarios, we want to build the containing JDK at the 'release'
16981     # debug level.
16982     DEBUG_LEVEL="release"
16983   fi
16984 
16985 
16986 
16987 
16988 
16989 
16990 # Check whether --with-jvm-variants was given.
16991 if test "${with_jvm_variants+set}" = set; then :
16992   withval=$with_jvm_variants;
16993 fi
16994 
16995 
16996 
16997 
16998 # Check whether --with-cpu-port was given.
16999 if test "${with_cpu_port+set}" = set; then :
17000   withval=$with_cpu_port;
17001 fi
17002 
17003 
17004   if test "x$with_cpu_port" != x; then
17005     if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
17006       as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
17007     fi
17008     if test "x$with_cpu_port" != xarm64 && \
17009         test "x$with_cpu_port" != xaarch64; then
17010       as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
17011     fi
17012     HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
17013   fi
17014 
17015 
17016   if test "x$with_jvm_variants" = x; then
17017     with_jvm_variants="server"
17018   fi
17019   JVM_VARIANTS_OPT="$with_jvm_variants"
17020 
17021   # Has the user listed more than one variant?
17022   # Additional [] needed to keep m4 from mangling shell constructs.
17023   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
17024     BUILDING_MULTIPLE_JVM_VARIANTS=true
17025   else
17026     BUILDING_MULTIPLE_JVM_VARIANTS=false
17027   fi
17028   # Replace the commas with AND for use in the build directory name.
17029   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
17030 
17031   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
17032 $as_echo_n "checking which variants of the JVM to build... " >&6; }
17033   # JVM_VARIANTS is a space-separated list.
17034   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
17035   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
17036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17037 $as_echo "$JVM_VARIANTS" >&6; }
17038 
17039   # Check that the selected variants are valid
17040 
17041   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17042   # Notice that the original variant failes on SLES 10 and 11
17043   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17044   STACK=${JVM_VARIANTS// /$'\n'}
17045   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17046   if test "x$INVALID_VARIANTS" != x; then
17047     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17048 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17049     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17050   fi
17051 
17052   # All "special" variants share the same output directory ("server")
17053   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17054   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17055   STACK=${JVM_VARIANTS// /$'\n'}
17056   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17057   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17058     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17059   fi
17060 
17061   # The "main" variant is the one used by other libs to link against during the
17062   # build.
17063   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17064     MAIN_VARIANT_PRIO_ORDER="server client minimal"
17065     for variant in $MAIN_VARIANT_PRIO_ORDER; do
17066       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17067         JVM_VARIANT_MAIN="$variant"
17068         break
17069       fi
17070     done
17071   else
17072     JVM_VARIANT_MAIN="$JVM_VARIANTS"
17073   fi
17074 
17075 
17076 
17077 
17078 
17079   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17080     # zero behaves as a platform and rewrites these values. This is really weird. :(
17081     # We are guaranteed that we do not build any other variants when building zero.
17082     HOTSPOT_TARGET_CPU=zero
17083     HOTSPOT_TARGET_CPU_ARCH=zero
17084   fi
17085 
17086 
17087 # With basic setup done, call the custom early hook.
17088 
17089 
17090 # Check if we have devkits, extra paths or sysroot set.
17091 
17092 
17093 # Check whether --with-devkit was given.
17094 if test "${with_devkit+set}" = set; then :
17095   withval=$with_devkit;
17096 
17097   # Only process if variable expands to non-empty
17098 
17099   if test "x$with_devkit" != x; then
17100     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17101 
17102   # Input might be given as Windows format, start by converting to
17103   # unix format.
17104   path="$with_devkit"
17105   new_path=`$CYGPATH -u "$path"`
17106 
17107   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17108   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17109   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17110   # "foo.exe" is OK but "foo" is an error.
17111   #
17112   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17113   # It is also a way to make sure we got the proper file name for the real test later on.
17114   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17115   if test "x$test_shortpath" = x; then
17116     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17117 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17118     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17119   fi
17120 
17121   # Call helper function which possibly converts this using DOS-style short mode.
17122   # If so, the updated path is stored in $new_path.
17123 
17124   input_path="$new_path"
17125   # Check if we need to convert this using DOS-style short mode. If the path
17126   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17127   # take no chances and rewrite it.
17128   # Note: m4 eats our [], so we need to use [ and ] instead.
17129   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17130   if test "x$has_forbidden_chars" != x; then
17131     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17132     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17133     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17134     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17135       # Going to short mode and back again did indeed matter. Since short mode is
17136       # case insensitive, let's make it lowercase to improve readability.
17137       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17138       # Now convert it back to Unix-style (cygpath)
17139       input_path=`$CYGPATH -u "$shortmode_path"`
17140       new_path="$input_path"
17141     fi
17142   fi
17143 
17144   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17145   if test "x$test_cygdrive_prefix" = x; then
17146     # As a simple fix, exclude /usr/bin since it's not a real path.
17147     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17148       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17149       # a path prefixed by /cygdrive for fixpath to work.
17150       new_path="$CYGWIN_ROOT_PATH$input_path"
17151     fi
17152   fi
17153 
17154 
17155   if test "x$path" != "x$new_path"; then
17156     with_devkit="$new_path"
17157     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17158 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17159   fi
17160 
17161     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17162 
17163   path="$with_devkit"
17164   has_colon=`$ECHO $path | $GREP ^.:`
17165   new_path="$path"
17166   if test "x$has_colon" = x; then
17167     # Not in mixed or Windows style, start by that.
17168     new_path=`cmd //c echo $path`
17169   fi
17170 
17171 
17172   input_path="$new_path"
17173   # Check if we need to convert this using DOS-style short mode. If the path
17174   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17175   # take no chances and rewrite it.
17176   # Note: m4 eats our [], so we need to use [ and ] instead.
17177   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17178   if test "x$has_forbidden_chars" != x; then
17179     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17180     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17181   fi
17182 
17183 
17184   windows_path="$new_path"
17185   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17186     unix_path=`$CYGPATH -u "$windows_path"`
17187     new_path="$unix_path"
17188   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17189     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17190     new_path="$unix_path"
17191   fi
17192 
17193   if test "x$path" != "x$new_path"; then
17194     with_devkit="$new_path"
17195     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17196 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17197   fi
17198 
17199   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17200   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17201 
17202     else
17203       # We're on a unix platform. Hooray! :)
17204       path="$with_devkit"
17205       has_space=`$ECHO "$path" | $GREP " "`
17206       if test "x$has_space" != x; then
17207         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17208 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17209         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17210       fi
17211 
17212       # Use eval to expand a potential ~
17213       eval path="$path"
17214       if test ! -f "$path" && test ! -d "$path"; then
17215         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17216       fi
17217 
17218       if test -d "$path"; then
17219         with_devkit="`cd "$path"; $THEPWDCMD -L`"
17220       else
17221         dir="`$DIRNAME "$path"`"
17222         base="`$BASENAME "$path"`"
17223         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17224       fi
17225     fi
17226   fi
17227 
17228         DEVKIT_ROOT="$with_devkit"
17229         # Check for a meta data info file in the root of the devkit
17230         if test -f "$DEVKIT_ROOT/devkit.info"; then
17231           . $DEVKIT_ROOT/devkit.info
17232           # This potentially sets the following:
17233           # A descriptive name of the devkit
17234 
17235   if test "x$DEVKIT_NAME" = x; then
17236     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17237   fi
17238 
17239           # Corresponds to --with-extra-path
17240 
17241   if test "x$DEVKIT_EXTRA_PATH" = x; then
17242     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17243   fi
17244 
17245           # Corresponds to --with-toolchain-path
17246 
17247   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17248     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17249   fi
17250 
17251           # Corresponds to --with-sysroot
17252 
17253   if test "x$DEVKIT_SYSROOT" = x; then
17254     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17255   fi
17256 
17257 
17258           # Identifies the Visual Studio version in the devkit
17259 
17260   if test "x$DEVKIT_VS_VERSION" = x; then
17261     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17262   fi
17263 
17264           # The Visual Studio include environment variable
17265 
17266   if test "x$DEVKIT_VS_INCLUDE" = x; then
17267     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17268   fi
17269 
17270           # The Visual Studio lib environment variable
17271 
17272   if test "x$DEVKIT_VS_LIB" = x; then
17273     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17274   fi
17275 
17276           # Corresponds to --with-msvcr-dll
17277 
17278   if test "x$DEVKIT_MSVCR_DLL" = x; then
17279     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17280   fi
17281 
17282           # Corresponds to --with-msvcp-dll
17283 
17284   if test "x$DEVKIT_MSVCP_DLL" = x; then
17285     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17286   fi
17287 
17288         fi
17289 
17290         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17291 $as_echo_n "checking for devkit... " >&6; }
17292         if test "x$DEVKIT_NAME" != x; then
17293           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17294 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17295         else
17296           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17297 $as_echo "$DEVKIT_ROOT" >&6; }
17298         fi
17299 
17300 
17301   if test "x$DEVKIT_EXTRA_PATH" != x; then
17302     if test "x$EXTRA_PATH" = x; then
17303       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17304     else
17305       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17306     fi
17307   fi
17308 
17309 
17310         # Fallback default of just /bin if DEVKIT_PATH is not defined
17311         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17312           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17313         fi
17314 
17315   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17316     if test "x$TOOLCHAIN_PATH" = x; then
17317       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17318     else
17319       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17320     fi
17321   fi
17322 
17323 
17324         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17325         # places for backwards compatiblity.
17326         if test "x$DEVKIT_SYSROOT" != x; then
17327           SYSROOT="$DEVKIT_SYSROOT"
17328         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17329           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17330         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17331           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17332         fi
17333 
17334 
17335 fi
17336 
17337 
17338   # You can force the sysroot if the sysroot encoded into the compiler tools
17339   # is not correct.
17340 
17341 # Check whether --with-sys-root was given.
17342 if test "${with_sys_root+set}" = set; then :
17343   withval=$with_sys_root; SYSROOT=$with_sys_root
17344 
17345 fi
17346 
17347 
17348 
17349 # Check whether --with-sysroot was given.
17350 if test "${with_sysroot+set}" = set; then :
17351   withval=$with_sysroot; SYSROOT=$with_sysroot
17352 
17353 fi
17354 
17355 
17356 
17357 # Check whether --with-tools-dir was given.
17358 if test "${with_tools_dir+set}" = set; then :
17359   withval=$with_tools_dir;
17360   if test "x$with_tools_dir" != x; then
17361     if test "x$TOOLCHAIN_PATH" = x; then
17362       TOOLCHAIN_PATH="$with_tools_dir"
17363     else
17364       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17365     fi
17366   fi
17367 
17368 
17369 fi
17370 
17371 
17372 
17373 # Check whether --with-toolchain-path was given.
17374 if test "${with_toolchain_path+set}" = set; then :
17375   withval=$with_toolchain_path;
17376   if test "x$with_toolchain_path" != x; then
17377     if test "x$TOOLCHAIN_PATH" = x; then
17378       TOOLCHAIN_PATH="$with_toolchain_path"
17379     else
17380       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17381     fi
17382   fi
17383 
17384 
17385 fi
17386 
17387 
17388 
17389 # Check whether --with-extra-path was given.
17390 if test "${with_extra_path+set}" = set; then :
17391   withval=$with_extra_path;
17392   if test "x$with_extra_path" != x; then
17393     if test "x$EXTRA_PATH" = x; then
17394       EXTRA_PATH="$with_extra_path"
17395     else
17396       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17397     fi
17398   fi
17399 
17400 
17401 fi
17402 
17403 
17404   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17405     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17406     # If not, detect if Xcode is installed by running xcodebuild -version
17407     # if no Xcode installed, xcodebuild exits with 1
17408     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17409     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17410       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17411       # fall back on the stub binary in /usr/bin/xcodebuild
17412       # Extract the first word of "xcodebuild", so it can be a program name with args.
17413 set dummy xcodebuild; ac_word=$2
17414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17415 $as_echo_n "checking for $ac_word... " >&6; }
17416 if ${ac_cv_path_XCODEBUILD+:} false; then :
17417   $as_echo_n "(cached) " >&6
17418 else
17419   case $XCODEBUILD in
17420   [\\/]* | ?:[\\/]*)
17421   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17422   ;;
17423   *)
17424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17425 for as_dir in $TOOLCHAIN_PATH
17426 do
17427   IFS=$as_save_IFS
17428   test -z "$as_dir" && as_dir=.
17429     for ac_exec_ext in '' $ac_executable_extensions; do
17430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17431     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17433     break 2
17434   fi
17435 done
17436   done
17437 IFS=$as_save_IFS
17438 
17439   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17440   ;;
17441 esac
17442 fi
17443 XCODEBUILD=$ac_cv_path_XCODEBUILD
17444 if test -n "$XCODEBUILD"; then
17445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17446 $as_echo "$XCODEBUILD" >&6; }
17447 else
17448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17449 $as_echo "no" >&6; }
17450 fi
17451 
17452 
17453     else
17454       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17455       # when only the command line tools are installed there are no SDKs, so headers
17456       # are copied into the system frameworks
17457       XCODEBUILD=
17458 
17459     fi
17460 
17461     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17462 $as_echo_n "checking for sdk name... " >&6; }
17463 
17464 # Check whether --with-sdk-name was given.
17465 if test "${with_sdk_name+set}" = set; then :
17466   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17467 
17468 fi
17469 
17470     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17471 $as_echo "$SDKNAME" >&6; }
17472 
17473     # if toolchain path is specified then don't rely on system headers, they may not compile
17474     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17475     test -z "$TOOLCHAIN_PATH" && \
17476       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17477 
17478     if test -z "$SYSROOT"; then
17479       if test -n "$XCODEBUILD"; then
17480         # if we don't have system headers, use default SDK name (last resort)
17481         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17482           SDKNAME=${SDKNAME:-macosx}
17483         fi
17484 
17485         if test -n "$SDKNAME"; then
17486           # Call xcodebuild to determine SYSROOT
17487           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17488         fi
17489       else
17490         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17491           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
17492         fi
17493       fi
17494     else
17495       # warn user if --with-sdk-name was also set
17496       if test -n "$with_sdk_name"; then
17497         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17498 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17499       fi
17500     fi
17501 
17502     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17503       # If no system framework headers, then SYSROOT must be set, or we won't build
17504       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
17505     fi
17506 
17507     # Perform a basic sanity test
17508     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17509       if test -z "$SYSROOT"; then
17510         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
17511       else
17512         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17513       fi
17514     fi
17515 
17516     # set SDKROOT too, Xcode tools will pick it up
17517     SDKROOT="$SYSROOT"
17518 
17519   fi
17520 
17521   # Prepend the extra path to the global path
17522 
17523   if test "x$EXTRA_PATH" != x; then
17524     if test "x$PATH" = x; then
17525       PATH="$EXTRA_PATH"
17526     else
17527       PATH="$EXTRA_PATH:$PATH"
17528     fi
17529   fi
17530 
17531 
17532   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17533 $as_echo_n "checking for sysroot... " >&6; }
17534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17535 $as_echo "$SYSROOT" >&6; }
17536   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17537 $as_echo_n "checking for toolchain path... " >&6; }
17538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17539 $as_echo "$TOOLCHAIN_PATH" >&6; }
17540   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17541 $as_echo_n "checking for extra path... " >&6; }
17542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17543 $as_echo "$EXTRA_PATH" >&6; }
17544 
17545 
17546 # To properly create a configuration name, we need to have the OpenJDK target
17547 # and options (variants and debug level) parsed.
17548 
17549 
17550 
17551 # Check whether --with-conf-name was given.
17552 if test "${with_conf_name+set}" = set; then :
17553   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17554 fi
17555 
17556 
17557 # Check whether --with-output-base-dir was given.
17558 if test "${with_output_base_dir+set}" = set; then :
17559   withval=$with_output_base_dir;  OUTPUT_BASE=${with_output_base_dir}
17560 else
17561    OUTPUT_BASE="$TOPDIR/build"
17562 fi
17563 
17564 
17565   # Test from where we are running configure, in or outside of src root.
17566   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17567 $as_echo_n "checking where to store configuration... " >&6; }
17568   if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$TOPDIR/common" \
17569       || test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
17570       || test "x$CURDIR" = "x$TOPDIR/make" ; then
17571     # We are running configure from the src root.
17572     # Create a default ./build/target-variant-debuglevel output root.
17573     if test "x${CONF_NAME}" = x; then
17574       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17575 $as_echo "in default location" >&6; }
17576       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17577     else
17578       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17579 $as_echo "in build directory with custom name" >&6; }
17580     fi
17581     OUTPUTDIR="${OUTPUT_BASE}/${CONF_NAME}"
17582     $MKDIR -p "$OUTPUTDIR"
17583     if test ! -d "$OUTPUTDIR"; then
17584       as_fn_error $? "Could not create build directory $OUTPUTDIR" "$LINENO" 5
17585     fi
17586   else
17587     # We are running configure from outside of the src dir.
17588     # Then use the current directory as output dir!
17589     # If configuration is situated in normal build directory, just use the build
17590     # directory name as configuration name, otherwise use the complete path.
17591     if test "x${CONF_NAME}" = x; then
17592       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
17593     fi
17594     OUTPUTDIR="$CURDIR"
17595     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17596 $as_echo "in current directory" >&6; }
17597 
17598     # WARNING: This might be a bad thing to do. You need to be sure you want to
17599     # have a configuration in this directory. Do some sanity checks!
17600 
17601     if test ! -e "$OUTPUTDIR/spec.gmk"; then
17602       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17603       # other files
17604       files_present=`$LS $OUTPUTDIR`
17605       # Configure has already touched config.log and confdefs.h in the current dir when this check
17606       # is performed.
17607       filtered_files=`$ECHO "$files_present" \
17608           | $SED -e 's/config.log//g' \
17609               -e 's/configure.log//g' \
17610               -e 's/confdefs.h//g' \
17611               -e 's/ //g' \
17612           | $TR -d '\n'`
17613       if test "x$filtered_files" != x; then
17614         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17615 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17616         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17617 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17618         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17619 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17620         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17621 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17622         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17623 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17624         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $TOPDIR' and restart configure" >&5
17625 $as_echo "$as_me: Try 'cd $TOPDIR' and restart configure" >&6;}
17626         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17627 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17628         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17629       fi
17630     fi
17631   fi
17632   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17633 $as_echo_n "checking what configuration name to use... " >&6; }
17634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17635 $as_echo "$CONF_NAME" >&6; }
17636 
17637 
17638   # Only process if variable expands to non-empty
17639 
17640   if test "x$OUTPUTDIR" != x; then
17641     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17642 
17643   # Input might be given as Windows format, start by converting to
17644   # unix format.
17645   path="$OUTPUTDIR"
17646   new_path=`$CYGPATH -u "$path"`
17647 
17648   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17649   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17650   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17651   # "foo.exe" is OK but "foo" is an error.
17652   #
17653   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17654   # It is also a way to make sure we got the proper file name for the real test later on.
17655   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17656   if test "x$test_shortpath" = x; then
17657     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&5
17658 $as_echo "$as_me: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&6;}
17659     as_fn_error $? "Cannot locate the the path of OUTPUTDIR" "$LINENO" 5
17660   fi
17661 
17662   # Call helper function which possibly converts this using DOS-style short mode.
17663   # If so, the updated path is stored in $new_path.
17664 
17665   input_path="$new_path"
17666   # Check if we need to convert this using DOS-style short mode. If the path
17667   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17668   # take no chances and rewrite it.
17669   # Note: m4 eats our [], so we need to use [ and ] instead.
17670   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17671   if test "x$has_forbidden_chars" != x; then
17672     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17673     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17674     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17675     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17676       # Going to short mode and back again did indeed matter. Since short mode is
17677       # case insensitive, let's make it lowercase to improve readability.
17678       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17679       # Now convert it back to Unix-style (cygpath)
17680       input_path=`$CYGPATH -u "$shortmode_path"`
17681       new_path="$input_path"
17682     fi
17683   fi
17684 
17685   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17686   if test "x$test_cygdrive_prefix" = x; then
17687     # As a simple fix, exclude /usr/bin since it's not a real path.
17688     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17689       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17690       # a path prefixed by /cygdrive for fixpath to work.
17691       new_path="$CYGWIN_ROOT_PATH$input_path"
17692     fi
17693   fi
17694 
17695 
17696   if test "x$path" != "x$new_path"; then
17697     OUTPUTDIR="$new_path"
17698     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUTDIR to \"$new_path\"" >&5
17699 $as_echo "$as_me: Rewriting OUTPUTDIR to \"$new_path\"" >&6;}
17700   fi
17701 
17702     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17703 
17704   path="$OUTPUTDIR"
17705   has_colon=`$ECHO $path | $GREP ^.:`
17706   new_path="$path"
17707   if test "x$has_colon" = x; then
17708     # Not in mixed or Windows style, start by that.
17709     new_path=`cmd //c echo $path`
17710   fi
17711 
17712 
17713   input_path="$new_path"
17714   # Check if we need to convert this using DOS-style short mode. If the path
17715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17716   # take no chances and rewrite it.
17717   # Note: m4 eats our [], so we need to use [ and ] instead.
17718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17719   if test "x$has_forbidden_chars" != x; then
17720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17721     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17722   fi
17723 
17724 
17725   windows_path="$new_path"
17726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17727     unix_path=`$CYGPATH -u "$windows_path"`
17728     new_path="$unix_path"
17729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17731     new_path="$unix_path"
17732   fi
17733 
17734   if test "x$path" != "x$new_path"; then
17735     OUTPUTDIR="$new_path"
17736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUTDIR to \"$new_path\"" >&5
17737 $as_echo "$as_me: Rewriting OUTPUTDIR to \"$new_path\"" >&6;}
17738   fi
17739 
17740   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17741   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17742 
17743     else
17744       # We're on a unix platform. Hooray! :)
17745       path="$OUTPUTDIR"
17746       has_space=`$ECHO "$path" | $GREP " "`
17747       if test "x$has_space" != x; then
17748         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&5
17749 $as_echo "$as_me: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&6;}
17750         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17751       fi
17752 
17753       # Use eval to expand a potential ~
17754       eval path="$path"
17755       if test ! -f "$path" && test ! -d "$path"; then
17756         as_fn_error $? "The path of OUTPUTDIR, which resolves as \"$path\", is not found." "$LINENO" 5
17757       fi
17758 
17759       if test -d "$path"; then
17760         OUTPUTDIR="`cd "$path"; $THEPWDCMD -L`"
17761       else
17762         dir="`$DIRNAME "$path"`"
17763         base="`$BASENAME "$path"`"
17764         OUTPUTDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
17765       fi
17766     fi
17767   fi
17768 
17769 
17770   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUTDIR/configure-support"
17771   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17772 
17773   SPEC="$OUTPUTDIR/spec.gmk"
17774 
17775 
17776 
17777 
17778 
17779   # The spec.gmk file contains all variables for the make system.
17780   ac_config_files="$ac_config_files $OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17781 
17782   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17783   ac_config_files="$ac_config_files $OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17784 
17785   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17786   ac_config_files="$ac_config_files $OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17787 
17788   # The compare.sh is used to compare the build output to other builds.
17789   ac_config_files="$ac_config_files $OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17790 
17791   # The generated Makefile knows where the spec.gmk is and where the source is.
17792   # You can run make from the OUTPUTDIR, or from the top-level Makefile
17793   # which will look for generated configurations
17794   ac_config_files="$ac_config_files $OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in"
17795 
17796 
17797 
17798 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17799 
17800   for ac_prog in apt-get yum brew port pkgutil pkgadd
17801 do
17802   # Extract the first word of "$ac_prog", so it can be a program name with args.
17803 set dummy $ac_prog; ac_word=$2
17804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17805 $as_echo_n "checking for $ac_word... " >&6; }
17806 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17807   $as_echo_n "(cached) " >&6
17808 else
17809   if test -n "$PKGHANDLER"; then
17810   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17811 else
17812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17813 for as_dir in $PATH
17814 do
17815   IFS=$as_save_IFS
17816   test -z "$as_dir" && as_dir=.
17817     for ac_exec_ext in '' $ac_executable_extensions; do
17818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17819     ac_cv_prog_PKGHANDLER="$ac_prog"
17820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17821     break 2
17822   fi
17823 done
17824   done
17825 IFS=$as_save_IFS
17826 
17827 fi
17828 fi
17829 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17830 if test -n "$PKGHANDLER"; then
17831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17832 $as_echo "$PKGHANDLER" >&6; }
17833 else
17834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17835 $as_echo "no" >&6; }
17836 fi
17837 
17838 
17839   test -n "$PKGHANDLER" && break
17840 done
17841 
17842 
17843 
17844 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17845 
17846 
17847 
17848   # Publish this variable in the help.
17849 
17850 
17851   if [ -z "${MAKE+x}" ]; then
17852     # The variable is not set by user, try to locate tool using the code snippet
17853 
17854     # Try our hardest to locate a correct version of GNU make
17855     for ac_prog in gmake
17856 do
17857   # Extract the first word of "$ac_prog", so it can be a program name with args.
17858 set dummy $ac_prog; ac_word=$2
17859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17860 $as_echo_n "checking for $ac_word... " >&6; }
17861 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17862   $as_echo_n "(cached) " >&6
17863 else
17864   case $CHECK_GMAKE in
17865   [\\/]* | ?:[\\/]*)
17866   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17867   ;;
17868   *)
17869   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17870 for as_dir in $PATH
17871 do
17872   IFS=$as_save_IFS
17873   test -z "$as_dir" && as_dir=.
17874     for ac_exec_ext in '' $ac_executable_extensions; do
17875   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17876     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17878     break 2
17879   fi
17880 done
17881   done
17882 IFS=$as_save_IFS
17883 
17884   ;;
17885 esac
17886 fi
17887 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17888 if test -n "$CHECK_GMAKE"; then
17889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17890 $as_echo "$CHECK_GMAKE" >&6; }
17891 else
17892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17893 $as_echo "no" >&6; }
17894 fi
17895 
17896 
17897   test -n "$CHECK_GMAKE" && break
17898 done
17899 
17900 
17901   MAKE_CANDIDATE=""$CHECK_GMAKE""
17902   DESCRIPTION="gmake in PATH"
17903 
17904   # On Cygwin, we require a newer version of make than on other platforms
17905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17906     MAKE_VERSION_EXPR="-e 4\."
17907     MAKE_REQUIRED_VERSION="4.0"
17908    else
17909     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17910     MAKE_REQUIRED_VERSION="3.81"
17911   fi
17912 
17913   if test "x$MAKE_CANDIDATE" != x; then
17914     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17915 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17916     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17917     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17918     if test "x$IS_GNU_MAKE" = x; then
17919       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17920 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17921     else
17922       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17923       if test "x$IS_MODERN_MAKE" = x; then
17924         { $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
17925 $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;}
17926       else
17927         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17928           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17929             MAKE_EXPECTED_ENV='cygwin'
17930           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17931             MAKE_EXPECTED_ENV='msys'
17932           else
17933             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17934           fi
17935           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17936           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17937         else
17938           # Not relevant for non-Windows
17939           IS_MAKE_CORRECT_ENV=true
17940         fi
17941         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17942           { $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
17943 $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;}
17944         else
17945           FOUND_MAKE=$MAKE_CANDIDATE
17946 
17947   # Only process if variable expands to non-empty
17948 
17949   if test "x$FOUND_MAKE" != x; then
17950     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17951 
17952   # First separate the path from the arguments. This will split at the first
17953   # space.
17954   complete="$FOUND_MAKE"
17955   path="${complete%% *}"
17956   tmp="$complete EOL"
17957   arguments="${tmp#* }"
17958 
17959   # Input might be given as Windows format, start by converting to
17960   # unix format.
17961   new_path=`$CYGPATH -u "$path"`
17962 
17963   # Now try to locate executable using which
17964   new_path=`$WHICH "$new_path" 2> /dev/null`
17965   # bat and cmd files are not always considered executable in cygwin causing which
17966   # to not find them
17967   if test "x$new_path" = x \
17968       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17969       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17970     new_path=`$CYGPATH -u "$path"`
17971   fi
17972   if test "x$new_path" = x; then
17973     # Oops. Which didn't find the executable.
17974     # The splitting of arguments from the executable at a space might have been incorrect,
17975     # since paths with space are more likely in Windows. Give it another try with the whole
17976     # argument.
17977     path="$complete"
17978     arguments="EOL"
17979     new_path=`$CYGPATH -u "$path"`
17980     new_path=`$WHICH "$new_path" 2> /dev/null`
17981     # bat and cmd files are not always considered executable in cygwin causing which
17982     # to not find them
17983     if test "x$new_path" = x \
17984         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17985         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17986       new_path=`$CYGPATH -u "$path"`
17987     fi
17988     if test "x$new_path" = x; then
17989       # It's still not found. Now this is an unrecoverable error.
17990       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17991 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17992       has_space=`$ECHO "$complete" | $GREP " "`
17993       if test "x$has_space" != x; then
17994         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17995 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17996       fi
17997       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17998     fi
17999   fi
18000 
18001   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18002   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18003   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18004   # "foo.exe" is OK but "foo" is an error.
18005   #
18006   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18007   # It is also a way to make sure we got the proper file name for the real test later on.
18008   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18009   if test "x$test_shortpath" = x; then
18010     # Short path failed, file does not exist as specified.
18011     # Try adding .exe or .cmd
18012     if test -f "${new_path}.exe"; then
18013       input_to_shortpath="${new_path}.exe"
18014     elif test -f "${new_path}.cmd"; then
18015       input_to_shortpath="${new_path}.cmd"
18016     else
18017       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18018 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18019       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18020 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18021       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18022     fi
18023   else
18024     input_to_shortpath="$new_path"
18025   fi
18026 
18027   # Call helper function which possibly converts this using DOS-style short mode.
18028   # If so, the updated path is stored in $new_path.
18029   new_path="$input_to_shortpath"
18030 
18031   input_path="$input_to_shortpath"
18032   # Check if we need to convert this using DOS-style short mode. If the path
18033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18034   # take no chances and rewrite it.
18035   # Note: m4 eats our [], so we need to use [ and ] instead.
18036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18037   if test "x$has_forbidden_chars" != x; then
18038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18039     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18040     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18041     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18042       # Going to short mode and back again did indeed matter. Since short mode is
18043       # case insensitive, let's make it lowercase to improve readability.
18044       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18045       # Now convert it back to Unix-style (cygpath)
18046       input_path=`$CYGPATH -u "$shortmode_path"`
18047       new_path="$input_path"
18048     fi
18049   fi
18050 
18051   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18052   if test "x$test_cygdrive_prefix" = x; then
18053     # As a simple fix, exclude /usr/bin since it's not a real path.
18054     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18055       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18056       # a path prefixed by /cygdrive for fixpath to work.
18057       new_path="$CYGWIN_ROOT_PATH$input_path"
18058     fi
18059   fi
18060 
18061   # remove trailing .exe if any
18062   new_path="${new_path/%.exe/}"
18063 
18064     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18065 
18066   # First separate the path from the arguments. This will split at the first
18067   # space.
18068   complete="$FOUND_MAKE"
18069   path="${complete%% *}"
18070   tmp="$complete EOL"
18071   arguments="${tmp#* }"
18072 
18073   # Input might be given as Windows format, start by converting to
18074   # unix format.
18075   new_path="$path"
18076 
18077   windows_path="$new_path"
18078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18079     unix_path=`$CYGPATH -u "$windows_path"`
18080     new_path="$unix_path"
18081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18083     new_path="$unix_path"
18084   fi
18085 
18086 
18087   # Now try to locate executable using which
18088   new_path=`$WHICH "$new_path" 2> /dev/null`
18089 
18090   if test "x$new_path" = x; then
18091     # Oops. Which didn't find the executable.
18092     # The splitting of arguments from the executable at a space might have been incorrect,
18093     # since paths with space are more likely in Windows. Give it another try with the whole
18094     # argument.
18095     path="$complete"
18096     arguments="EOL"
18097     new_path="$path"
18098 
18099   windows_path="$new_path"
18100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18101     unix_path=`$CYGPATH -u "$windows_path"`
18102     new_path="$unix_path"
18103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18105     new_path="$unix_path"
18106   fi
18107 
18108 
18109     new_path=`$WHICH "$new_path" 2> /dev/null`
18110     # bat and cmd files are not always considered executable in MSYS causing which
18111     # to not find them
18112     if test "x$new_path" = x \
18113         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18114         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18115       new_path="$path"
18116 
18117   windows_path="$new_path"
18118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18119     unix_path=`$CYGPATH -u "$windows_path"`
18120     new_path="$unix_path"
18121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18122     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18123     new_path="$unix_path"
18124   fi
18125 
18126     fi
18127 
18128     if test "x$new_path" = x; then
18129       # It's still not found. Now this is an unrecoverable error.
18130       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18131 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18132       has_space=`$ECHO "$complete" | $GREP " "`
18133       if test "x$has_space" != x; then
18134         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18135 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18136       fi
18137       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18138     fi
18139   fi
18140 
18141   # Now new_path has a complete unix path to the binary
18142   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18143     # Keep paths in /bin as-is, but remove trailing .exe if any
18144     new_path="${new_path/%.exe/}"
18145     # Do not save /bin paths to all_fixpath_prefixes!
18146   else
18147     # Not in mixed or Windows style, start by that.
18148     new_path=`cmd //c echo $new_path`
18149 
18150   input_path="$new_path"
18151   # Check if we need to convert this using DOS-style short mode. If the path
18152   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18153   # take no chances and rewrite it.
18154   # Note: m4 eats our [], so we need to use [ and ] instead.
18155   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18156   if test "x$has_forbidden_chars" != x; then
18157     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18158     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18159   fi
18160 
18161     # Output is in $new_path
18162 
18163   windows_path="$new_path"
18164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18165     unix_path=`$CYGPATH -u "$windows_path"`
18166     new_path="$unix_path"
18167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18169     new_path="$unix_path"
18170   fi
18171 
18172     # remove trailing .exe if any
18173     new_path="${new_path/%.exe/}"
18174 
18175     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18176     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18177   fi
18178 
18179     else
18180       # We're on a unix platform. Hooray! :)
18181       # First separate the path from the arguments. This will split at the first
18182       # space.
18183       complete="$FOUND_MAKE"
18184       path="${complete%% *}"
18185       tmp="$complete EOL"
18186       arguments="${tmp#* }"
18187 
18188       # Cannot rely on the command "which" here since it doesn't always work.
18189       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18190       if test -z "$is_absolute_path"; then
18191         # Path to executable is not absolute. Find it.
18192         IFS_save="$IFS"
18193         IFS=:
18194         for p in $PATH; do
18195           if test -f "$p/$path" && test -x "$p/$path"; then
18196             new_path="$p/$path"
18197             break
18198           fi
18199         done
18200         IFS="$IFS_save"
18201       else
18202         # This is an absolute path, we can use it without further modifications.
18203         new_path="$path"
18204       fi
18205 
18206       if test "x$new_path" = x; then
18207         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18208 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18209         has_space=`$ECHO "$complete" | $GREP " "`
18210         if test "x$has_space" != x; then
18211           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18212 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18213         fi
18214         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18215       fi
18216     fi
18217 
18218     # Now join together the path and the arguments once again
18219     if test "x$arguments" != xEOL; then
18220       new_complete="$new_path ${arguments% *}"
18221     else
18222       new_complete="$new_path"
18223     fi
18224 
18225     if test "x$complete" != "x$new_complete"; then
18226       FOUND_MAKE="$new_complete"
18227       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18228 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18229     fi
18230   fi
18231 
18232         fi
18233       fi
18234     fi
18235   fi
18236 
18237 
18238     if test "x$FOUND_MAKE" = x; then
18239       for ac_prog in make
18240 do
18241   # Extract the first word of "$ac_prog", so it can be a program name with args.
18242 set dummy $ac_prog; ac_word=$2
18243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18244 $as_echo_n "checking for $ac_word... " >&6; }
18245 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18246   $as_echo_n "(cached) " >&6
18247 else
18248   case $CHECK_MAKE in
18249   [\\/]* | ?:[\\/]*)
18250   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18251   ;;
18252   *)
18253   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18254 for as_dir in $PATH
18255 do
18256   IFS=$as_save_IFS
18257   test -z "$as_dir" && as_dir=.
18258     for ac_exec_ext in '' $ac_executable_extensions; do
18259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18260     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18262     break 2
18263   fi
18264 done
18265   done
18266 IFS=$as_save_IFS
18267 
18268   ;;
18269 esac
18270 fi
18271 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18272 if test -n "$CHECK_MAKE"; then
18273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18274 $as_echo "$CHECK_MAKE" >&6; }
18275 else
18276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18277 $as_echo "no" >&6; }
18278 fi
18279 
18280 
18281   test -n "$CHECK_MAKE" && break
18282 done
18283 
18284 
18285   MAKE_CANDIDATE=""$CHECK_MAKE""
18286   DESCRIPTION="make in PATH"
18287 
18288   # On Cygwin, we require a newer version of make than on other platforms
18289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18290     MAKE_VERSION_EXPR="-e 4\."
18291     MAKE_REQUIRED_VERSION="4.0"
18292    else
18293     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18294     MAKE_REQUIRED_VERSION="3.81"
18295   fi
18296 
18297   if test "x$MAKE_CANDIDATE" != x; then
18298     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18299 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18300     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18301     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18302     if test "x$IS_GNU_MAKE" = x; then
18303       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18304 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18305     else
18306       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18307       if test "x$IS_MODERN_MAKE" = x; then
18308         { $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
18309 $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;}
18310       else
18311         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18312           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18313             MAKE_EXPECTED_ENV='cygwin'
18314           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18315             MAKE_EXPECTED_ENV='msys'
18316           else
18317             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18318           fi
18319           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18320           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18321         else
18322           # Not relevant for non-Windows
18323           IS_MAKE_CORRECT_ENV=true
18324         fi
18325         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18326           { $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
18327 $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;}
18328         else
18329           FOUND_MAKE=$MAKE_CANDIDATE
18330 
18331   # Only process if variable expands to non-empty
18332 
18333   if test "x$FOUND_MAKE" != x; then
18334     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18335 
18336   # First separate the path from the arguments. This will split at the first
18337   # space.
18338   complete="$FOUND_MAKE"
18339   path="${complete%% *}"
18340   tmp="$complete EOL"
18341   arguments="${tmp#* }"
18342 
18343   # Input might be given as Windows format, start by converting to
18344   # unix format.
18345   new_path=`$CYGPATH -u "$path"`
18346 
18347   # Now try to locate executable using which
18348   new_path=`$WHICH "$new_path" 2> /dev/null`
18349   # bat and cmd files are not always considered executable in cygwin causing which
18350   # to not find them
18351   if test "x$new_path" = x \
18352       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18353       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18354     new_path=`$CYGPATH -u "$path"`
18355   fi
18356   if test "x$new_path" = x; then
18357     # Oops. Which didn't find the executable.
18358     # The splitting of arguments from the executable at a space might have been incorrect,
18359     # since paths with space are more likely in Windows. Give it another try with the whole
18360     # argument.
18361     path="$complete"
18362     arguments="EOL"
18363     new_path=`$CYGPATH -u "$path"`
18364     new_path=`$WHICH "$new_path" 2> /dev/null`
18365     # bat and cmd files are not always considered executable in cygwin causing which
18366     # to not find them
18367     if test "x$new_path" = x \
18368         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18369         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18370       new_path=`$CYGPATH -u "$path"`
18371     fi
18372     if test "x$new_path" = x; then
18373       # It's still not found. Now this is an unrecoverable error.
18374       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18375 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18376       has_space=`$ECHO "$complete" | $GREP " "`
18377       if test "x$has_space" != x; then
18378         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18379 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18380       fi
18381       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18382     fi
18383   fi
18384 
18385   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18386   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18387   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18388   # "foo.exe" is OK but "foo" is an error.
18389   #
18390   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18391   # It is also a way to make sure we got the proper file name for the real test later on.
18392   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18393   if test "x$test_shortpath" = x; then
18394     # Short path failed, file does not exist as specified.
18395     # Try adding .exe or .cmd
18396     if test -f "${new_path}.exe"; then
18397       input_to_shortpath="${new_path}.exe"
18398     elif test -f "${new_path}.cmd"; then
18399       input_to_shortpath="${new_path}.cmd"
18400     else
18401       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18402 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18403       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18404 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18405       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18406     fi
18407   else
18408     input_to_shortpath="$new_path"
18409   fi
18410 
18411   # Call helper function which possibly converts this using DOS-style short mode.
18412   # If so, the updated path is stored in $new_path.
18413   new_path="$input_to_shortpath"
18414 
18415   input_path="$input_to_shortpath"
18416   # Check if we need to convert this using DOS-style short mode. If the path
18417   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18418   # take no chances and rewrite it.
18419   # Note: m4 eats our [], so we need to use [ and ] instead.
18420   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18421   if test "x$has_forbidden_chars" != x; then
18422     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18423     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18424     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18425     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18426       # Going to short mode and back again did indeed matter. Since short mode is
18427       # case insensitive, let's make it lowercase to improve readability.
18428       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18429       # Now convert it back to Unix-style (cygpath)
18430       input_path=`$CYGPATH -u "$shortmode_path"`
18431       new_path="$input_path"
18432     fi
18433   fi
18434 
18435   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18436   if test "x$test_cygdrive_prefix" = x; then
18437     # As a simple fix, exclude /usr/bin since it's not a real path.
18438     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18439       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18440       # a path prefixed by /cygdrive for fixpath to work.
18441       new_path="$CYGWIN_ROOT_PATH$input_path"
18442     fi
18443   fi
18444 
18445   # remove trailing .exe if any
18446   new_path="${new_path/%.exe/}"
18447 
18448     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18449 
18450   # First separate the path from the arguments. This will split at the first
18451   # space.
18452   complete="$FOUND_MAKE"
18453   path="${complete%% *}"
18454   tmp="$complete EOL"
18455   arguments="${tmp#* }"
18456 
18457   # Input might be given as Windows format, start by converting to
18458   # unix format.
18459   new_path="$path"
18460 
18461   windows_path="$new_path"
18462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18463     unix_path=`$CYGPATH -u "$windows_path"`
18464     new_path="$unix_path"
18465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18467     new_path="$unix_path"
18468   fi
18469 
18470 
18471   # Now try to locate executable using which
18472   new_path=`$WHICH "$new_path" 2> /dev/null`
18473 
18474   if test "x$new_path" = x; then
18475     # Oops. Which didn't find the executable.
18476     # The splitting of arguments from the executable at a space might have been incorrect,
18477     # since paths with space are more likely in Windows. Give it another try with the whole
18478     # argument.
18479     path="$complete"
18480     arguments="EOL"
18481     new_path="$path"
18482 
18483   windows_path="$new_path"
18484   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18485     unix_path=`$CYGPATH -u "$windows_path"`
18486     new_path="$unix_path"
18487   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18488     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18489     new_path="$unix_path"
18490   fi
18491 
18492 
18493     new_path=`$WHICH "$new_path" 2> /dev/null`
18494     # bat and cmd files are not always considered executable in MSYS causing which
18495     # to not find them
18496     if test "x$new_path" = x \
18497         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18498         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18499       new_path="$path"
18500 
18501   windows_path="$new_path"
18502   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18503     unix_path=`$CYGPATH -u "$windows_path"`
18504     new_path="$unix_path"
18505   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18506     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18507     new_path="$unix_path"
18508   fi
18509 
18510     fi
18511 
18512     if test "x$new_path" = x; then
18513       # It's still not found. Now this is an unrecoverable error.
18514       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18515 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18516       has_space=`$ECHO "$complete" | $GREP " "`
18517       if test "x$has_space" != x; then
18518         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18519 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18520       fi
18521       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18522     fi
18523   fi
18524 
18525   # Now new_path has a complete unix path to the binary
18526   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18527     # Keep paths in /bin as-is, but remove trailing .exe if any
18528     new_path="${new_path/%.exe/}"
18529     # Do not save /bin paths to all_fixpath_prefixes!
18530   else
18531     # Not in mixed or Windows style, start by that.
18532     new_path=`cmd //c echo $new_path`
18533 
18534   input_path="$new_path"
18535   # Check if we need to convert this using DOS-style short mode. If the path
18536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18537   # take no chances and rewrite it.
18538   # Note: m4 eats our [], so we need to use [ and ] instead.
18539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18540   if test "x$has_forbidden_chars" != x; then
18541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18542     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18543   fi
18544 
18545     # Output is in $new_path
18546 
18547   windows_path="$new_path"
18548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18549     unix_path=`$CYGPATH -u "$windows_path"`
18550     new_path="$unix_path"
18551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18553     new_path="$unix_path"
18554   fi
18555 
18556     # remove trailing .exe if any
18557     new_path="${new_path/%.exe/}"
18558 
18559     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18560     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18561   fi
18562 
18563     else
18564       # We're on a unix platform. Hooray! :)
18565       # First separate the path from the arguments. This will split at the first
18566       # space.
18567       complete="$FOUND_MAKE"
18568       path="${complete%% *}"
18569       tmp="$complete EOL"
18570       arguments="${tmp#* }"
18571 
18572       # Cannot rely on the command "which" here since it doesn't always work.
18573       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18574       if test -z "$is_absolute_path"; then
18575         # Path to executable is not absolute. Find it.
18576         IFS_save="$IFS"
18577         IFS=:
18578         for p in $PATH; do
18579           if test -f "$p/$path" && test -x "$p/$path"; then
18580             new_path="$p/$path"
18581             break
18582           fi
18583         done
18584         IFS="$IFS_save"
18585       else
18586         # This is an absolute path, we can use it without further modifications.
18587         new_path="$path"
18588       fi
18589 
18590       if test "x$new_path" = x; then
18591         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18592 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18593         has_space=`$ECHO "$complete" | $GREP " "`
18594         if test "x$has_space" != x; then
18595           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18596 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18597         fi
18598         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18599       fi
18600     fi
18601 
18602     # Now join together the path and the arguments once again
18603     if test "x$arguments" != xEOL; then
18604       new_complete="$new_path ${arguments% *}"
18605     else
18606       new_complete="$new_path"
18607     fi
18608 
18609     if test "x$complete" != "x$new_complete"; then
18610       FOUND_MAKE="$new_complete"
18611       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18612 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18613     fi
18614   fi
18615 
18616         fi
18617       fi
18618     fi
18619   fi
18620 
18621     fi
18622 
18623     if test "x$FOUND_MAKE" = x; then
18624       if test "x$TOOLCHAIN_PATH" != x; then
18625         # We have a toolchain path, check that as well before giving up.
18626         OLD_PATH=$PATH
18627         PATH=$TOOLCHAIN_PATH:$PATH
18628         for ac_prog in gmake
18629 do
18630   # Extract the first word of "$ac_prog", so it can be a program name with args.
18631 set dummy $ac_prog; ac_word=$2
18632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18633 $as_echo_n "checking for $ac_word... " >&6; }
18634 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18635   $as_echo_n "(cached) " >&6
18636 else
18637   case $CHECK_TOOLSDIR_GMAKE in
18638   [\\/]* | ?:[\\/]*)
18639   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18640   ;;
18641   *)
18642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18643 for as_dir in $PATH
18644 do
18645   IFS=$as_save_IFS
18646   test -z "$as_dir" && as_dir=.
18647     for ac_exec_ext in '' $ac_executable_extensions; do
18648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18649     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18651     break 2
18652   fi
18653 done
18654   done
18655 IFS=$as_save_IFS
18656 
18657   ;;
18658 esac
18659 fi
18660 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18661 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18663 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18664 else
18665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18666 $as_echo "no" >&6; }
18667 fi
18668 
18669 
18670   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18671 done
18672 
18673 
18674   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18675   DESCRIPTION="gmake in tools-dir"
18676 
18677   # On Cygwin, we require a newer version of make than on other platforms
18678   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18679     MAKE_VERSION_EXPR="-e 4\."
18680     MAKE_REQUIRED_VERSION="4.0"
18681    else
18682     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18683     MAKE_REQUIRED_VERSION="3.81"
18684   fi
18685 
18686   if test "x$MAKE_CANDIDATE" != x; then
18687     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18688 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18689     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18690     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18691     if test "x$IS_GNU_MAKE" = x; then
18692       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18693 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18694     else
18695       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18696       if test "x$IS_MODERN_MAKE" = x; then
18697         { $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
18698 $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;}
18699       else
18700         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18701           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18702             MAKE_EXPECTED_ENV='cygwin'
18703           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18704             MAKE_EXPECTED_ENV='msys'
18705           else
18706             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18707           fi
18708           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18709           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18710         else
18711           # Not relevant for non-Windows
18712           IS_MAKE_CORRECT_ENV=true
18713         fi
18714         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18715           { $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
18716 $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;}
18717         else
18718           FOUND_MAKE=$MAKE_CANDIDATE
18719 
18720   # Only process if variable expands to non-empty
18721 
18722   if test "x$FOUND_MAKE" != x; then
18723     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18724 
18725   # First separate the path from the arguments. This will split at the first
18726   # space.
18727   complete="$FOUND_MAKE"
18728   path="${complete%% *}"
18729   tmp="$complete EOL"
18730   arguments="${tmp#* }"
18731 
18732   # Input might be given as Windows format, start by converting to
18733   # unix format.
18734   new_path=`$CYGPATH -u "$path"`
18735 
18736   # Now try to locate executable using which
18737   new_path=`$WHICH "$new_path" 2> /dev/null`
18738   # bat and cmd files are not always considered executable in cygwin causing which
18739   # to not find them
18740   if test "x$new_path" = x \
18741       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18742       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18743     new_path=`$CYGPATH -u "$path"`
18744   fi
18745   if test "x$new_path" = x; then
18746     # Oops. Which didn't find the executable.
18747     # The splitting of arguments from the executable at a space might have been incorrect,
18748     # since paths with space are more likely in Windows. Give it another try with the whole
18749     # argument.
18750     path="$complete"
18751     arguments="EOL"
18752     new_path=`$CYGPATH -u "$path"`
18753     new_path=`$WHICH "$new_path" 2> /dev/null`
18754     # bat and cmd files are not always considered executable in cygwin causing which
18755     # to not find them
18756     if test "x$new_path" = x \
18757         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18758         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18759       new_path=`$CYGPATH -u "$path"`
18760     fi
18761     if test "x$new_path" = x; then
18762       # It's still not found. Now this is an unrecoverable error.
18763       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18764 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18765       has_space=`$ECHO "$complete" | $GREP " "`
18766       if test "x$has_space" != x; then
18767         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18768 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18769       fi
18770       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18771     fi
18772   fi
18773 
18774   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18775   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18776   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18777   # "foo.exe" is OK but "foo" is an error.
18778   #
18779   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18780   # It is also a way to make sure we got the proper file name for the real test later on.
18781   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18782   if test "x$test_shortpath" = x; then
18783     # Short path failed, file does not exist as specified.
18784     # Try adding .exe or .cmd
18785     if test -f "${new_path}.exe"; then
18786       input_to_shortpath="${new_path}.exe"
18787     elif test -f "${new_path}.cmd"; then
18788       input_to_shortpath="${new_path}.cmd"
18789     else
18790       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18791 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18792       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18793 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18794       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18795     fi
18796   else
18797     input_to_shortpath="$new_path"
18798   fi
18799 
18800   # Call helper function which possibly converts this using DOS-style short mode.
18801   # If so, the updated path is stored in $new_path.
18802   new_path="$input_to_shortpath"
18803 
18804   input_path="$input_to_shortpath"
18805   # Check if we need to convert this using DOS-style short mode. If the path
18806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18807   # take no chances and rewrite it.
18808   # Note: m4 eats our [], so we need to use [ and ] instead.
18809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18810   if test "x$has_forbidden_chars" != x; then
18811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18812     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18813     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18814     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18815       # Going to short mode and back again did indeed matter. Since short mode is
18816       # case insensitive, let's make it lowercase to improve readability.
18817       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18818       # Now convert it back to Unix-style (cygpath)
18819       input_path=`$CYGPATH -u "$shortmode_path"`
18820       new_path="$input_path"
18821     fi
18822   fi
18823 
18824   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18825   if test "x$test_cygdrive_prefix" = x; then
18826     # As a simple fix, exclude /usr/bin since it's not a real path.
18827     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18828       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18829       # a path prefixed by /cygdrive for fixpath to work.
18830       new_path="$CYGWIN_ROOT_PATH$input_path"
18831     fi
18832   fi
18833 
18834   # remove trailing .exe if any
18835   new_path="${new_path/%.exe/}"
18836 
18837     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18838 
18839   # First separate the path from the arguments. This will split at the first
18840   # space.
18841   complete="$FOUND_MAKE"
18842   path="${complete%% *}"
18843   tmp="$complete EOL"
18844   arguments="${tmp#* }"
18845 
18846   # Input might be given as Windows format, start by converting to
18847   # unix format.
18848   new_path="$path"
18849 
18850   windows_path="$new_path"
18851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18852     unix_path=`$CYGPATH -u "$windows_path"`
18853     new_path="$unix_path"
18854   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18855     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18856     new_path="$unix_path"
18857   fi
18858 
18859 
18860   # Now try to locate executable using which
18861   new_path=`$WHICH "$new_path" 2> /dev/null`
18862 
18863   if test "x$new_path" = x; then
18864     # Oops. Which didn't find the executable.
18865     # The splitting of arguments from the executable at a space might have been incorrect,
18866     # since paths with space are more likely in Windows. Give it another try with the whole
18867     # argument.
18868     path="$complete"
18869     arguments="EOL"
18870     new_path="$path"
18871 
18872   windows_path="$new_path"
18873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18874     unix_path=`$CYGPATH -u "$windows_path"`
18875     new_path="$unix_path"
18876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18878     new_path="$unix_path"
18879   fi
18880 
18881 
18882     new_path=`$WHICH "$new_path" 2> /dev/null`
18883     # bat and cmd files are not always considered executable in MSYS causing which
18884     # to not find them
18885     if test "x$new_path" = x \
18886         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18887         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18888       new_path="$path"
18889 
18890   windows_path="$new_path"
18891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18892     unix_path=`$CYGPATH -u "$windows_path"`
18893     new_path="$unix_path"
18894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18895     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18896     new_path="$unix_path"
18897   fi
18898 
18899     fi
18900 
18901     if test "x$new_path" = x; then
18902       # It's still not found. Now this is an unrecoverable error.
18903       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18904 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18905       has_space=`$ECHO "$complete" | $GREP " "`
18906       if test "x$has_space" != x; then
18907         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18908 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18909       fi
18910       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18911     fi
18912   fi
18913 
18914   # Now new_path has a complete unix path to the binary
18915   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18916     # Keep paths in /bin as-is, but remove trailing .exe if any
18917     new_path="${new_path/%.exe/}"
18918     # Do not save /bin paths to all_fixpath_prefixes!
18919   else
18920     # Not in mixed or Windows style, start by that.
18921     new_path=`cmd //c echo $new_path`
18922 
18923   input_path="$new_path"
18924   # Check if we need to convert this using DOS-style short mode. If the path
18925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18926   # take no chances and rewrite it.
18927   # Note: m4 eats our [], so we need to use [ and ] instead.
18928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18929   if test "x$has_forbidden_chars" != x; then
18930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18931     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18932   fi
18933 
18934     # Output is in $new_path
18935 
18936   windows_path="$new_path"
18937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18938     unix_path=`$CYGPATH -u "$windows_path"`
18939     new_path="$unix_path"
18940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18942     new_path="$unix_path"
18943   fi
18944 
18945     # remove trailing .exe if any
18946     new_path="${new_path/%.exe/}"
18947 
18948     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18949     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18950   fi
18951 
18952     else
18953       # We're on a unix platform. Hooray! :)
18954       # First separate the path from the arguments. This will split at the first
18955       # space.
18956       complete="$FOUND_MAKE"
18957       path="${complete%% *}"
18958       tmp="$complete EOL"
18959       arguments="${tmp#* }"
18960 
18961       # Cannot rely on the command "which" here since it doesn't always work.
18962       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18963       if test -z "$is_absolute_path"; then
18964         # Path to executable is not absolute. Find it.
18965         IFS_save="$IFS"
18966         IFS=:
18967         for p in $PATH; do
18968           if test -f "$p/$path" && test -x "$p/$path"; then
18969             new_path="$p/$path"
18970             break
18971           fi
18972         done
18973         IFS="$IFS_save"
18974       else
18975         # This is an absolute path, we can use it without further modifications.
18976         new_path="$path"
18977       fi
18978 
18979       if test "x$new_path" = x; then
18980         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18981 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18982         has_space=`$ECHO "$complete" | $GREP " "`
18983         if test "x$has_space" != x; then
18984           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18985 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18986         fi
18987         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18988       fi
18989     fi
18990 
18991     # Now join together the path and the arguments once again
18992     if test "x$arguments" != xEOL; then
18993       new_complete="$new_path ${arguments% *}"
18994     else
18995       new_complete="$new_path"
18996     fi
18997 
18998     if test "x$complete" != "x$new_complete"; then
18999       FOUND_MAKE="$new_complete"
19000       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19001 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19002     fi
19003   fi
19004 
19005         fi
19006       fi
19007     fi
19008   fi
19009 
19010         if test "x$FOUND_MAKE" = x; then
19011           for ac_prog in make
19012 do
19013   # Extract the first word of "$ac_prog", so it can be a program name with args.
19014 set dummy $ac_prog; ac_word=$2
19015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19016 $as_echo_n "checking for $ac_word... " >&6; }
19017 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19018   $as_echo_n "(cached) " >&6
19019 else
19020   case $CHECK_TOOLSDIR_MAKE in
19021   [\\/]* | ?:[\\/]*)
19022   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19023   ;;
19024   *)
19025   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19026 for as_dir in $PATH
19027 do
19028   IFS=$as_save_IFS
19029   test -z "$as_dir" && as_dir=.
19030     for ac_exec_ext in '' $ac_executable_extensions; do
19031   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19032     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19033     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19034     break 2
19035   fi
19036 done
19037   done
19038 IFS=$as_save_IFS
19039 
19040   ;;
19041 esac
19042 fi
19043 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19044 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19046 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19047 else
19048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19049 $as_echo "no" >&6; }
19050 fi
19051 
19052 
19053   test -n "$CHECK_TOOLSDIR_MAKE" && break
19054 done
19055 
19056 
19057   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19058   DESCRIPTION="make in tools-dir"
19059 
19060   # On Cygwin, we require a newer version of make than on other platforms
19061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19062     MAKE_VERSION_EXPR="-e 4\."
19063     MAKE_REQUIRED_VERSION="4.0"
19064    else
19065     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19066     MAKE_REQUIRED_VERSION="3.81"
19067   fi
19068 
19069   if test "x$MAKE_CANDIDATE" != x; then
19070     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19071 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19072     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19073     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19074     if test "x$IS_GNU_MAKE" = x; then
19075       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19076 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19077     else
19078       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19079       if test "x$IS_MODERN_MAKE" = x; then
19080         { $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
19081 $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;}
19082       else
19083         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19084           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19085             MAKE_EXPECTED_ENV='cygwin'
19086           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19087             MAKE_EXPECTED_ENV='msys'
19088           else
19089             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19090           fi
19091           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19092           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19093         else
19094           # Not relevant for non-Windows
19095           IS_MAKE_CORRECT_ENV=true
19096         fi
19097         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19098           { $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
19099 $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;}
19100         else
19101           FOUND_MAKE=$MAKE_CANDIDATE
19102 
19103   # Only process if variable expands to non-empty
19104 
19105   if test "x$FOUND_MAKE" != x; then
19106     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19107 
19108   # First separate the path from the arguments. This will split at the first
19109   # space.
19110   complete="$FOUND_MAKE"
19111   path="${complete%% *}"
19112   tmp="$complete EOL"
19113   arguments="${tmp#* }"
19114 
19115   # Input might be given as Windows format, start by converting to
19116   # unix format.
19117   new_path=`$CYGPATH -u "$path"`
19118 
19119   # Now try to locate executable using which
19120   new_path=`$WHICH "$new_path" 2> /dev/null`
19121   # bat and cmd files are not always considered executable in cygwin causing which
19122   # to not find them
19123   if test "x$new_path" = x \
19124       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19125       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19126     new_path=`$CYGPATH -u "$path"`
19127   fi
19128   if test "x$new_path" = x; then
19129     # Oops. Which didn't find the executable.
19130     # The splitting of arguments from the executable at a space might have been incorrect,
19131     # since paths with space are more likely in Windows. Give it another try with the whole
19132     # argument.
19133     path="$complete"
19134     arguments="EOL"
19135     new_path=`$CYGPATH -u "$path"`
19136     new_path=`$WHICH "$new_path" 2> /dev/null`
19137     # bat and cmd files are not always considered executable in cygwin causing which
19138     # to not find them
19139     if test "x$new_path" = x \
19140         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19141         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19142       new_path=`$CYGPATH -u "$path"`
19143     fi
19144     if test "x$new_path" = x; then
19145       # It's still not found. Now this is an unrecoverable error.
19146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19147 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19148       has_space=`$ECHO "$complete" | $GREP " "`
19149       if test "x$has_space" != x; then
19150         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19151 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19152       fi
19153       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19154     fi
19155   fi
19156 
19157   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19158   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19159   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19160   # "foo.exe" is OK but "foo" is an error.
19161   #
19162   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19163   # It is also a way to make sure we got the proper file name for the real test later on.
19164   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19165   if test "x$test_shortpath" = x; then
19166     # Short path failed, file does not exist as specified.
19167     # Try adding .exe or .cmd
19168     if test -f "${new_path}.exe"; then
19169       input_to_shortpath="${new_path}.exe"
19170     elif test -f "${new_path}.cmd"; then
19171       input_to_shortpath="${new_path}.cmd"
19172     else
19173       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19174 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19175       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19176 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19177       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19178     fi
19179   else
19180     input_to_shortpath="$new_path"
19181   fi
19182 
19183   # Call helper function which possibly converts this using DOS-style short mode.
19184   # If so, the updated path is stored in $new_path.
19185   new_path="$input_to_shortpath"
19186 
19187   input_path="$input_to_shortpath"
19188   # Check if we need to convert this using DOS-style short mode. If the path
19189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19190   # take no chances and rewrite it.
19191   # Note: m4 eats our [], so we need to use [ and ] instead.
19192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19193   if test "x$has_forbidden_chars" != x; then
19194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19195     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19196     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19197     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19198       # Going to short mode and back again did indeed matter. Since short mode is
19199       # case insensitive, let's make it lowercase to improve readability.
19200       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19201       # Now convert it back to Unix-style (cygpath)
19202       input_path=`$CYGPATH -u "$shortmode_path"`
19203       new_path="$input_path"
19204     fi
19205   fi
19206 
19207   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19208   if test "x$test_cygdrive_prefix" = x; then
19209     # As a simple fix, exclude /usr/bin since it's not a real path.
19210     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19211       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19212       # a path prefixed by /cygdrive for fixpath to work.
19213       new_path="$CYGWIN_ROOT_PATH$input_path"
19214     fi
19215   fi
19216 
19217   # remove trailing .exe if any
19218   new_path="${new_path/%.exe/}"
19219 
19220     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19221 
19222   # First separate the path from the arguments. This will split at the first
19223   # space.
19224   complete="$FOUND_MAKE"
19225   path="${complete%% *}"
19226   tmp="$complete EOL"
19227   arguments="${tmp#* }"
19228 
19229   # Input might be given as Windows format, start by converting to
19230   # unix format.
19231   new_path="$path"
19232 
19233   windows_path="$new_path"
19234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19235     unix_path=`$CYGPATH -u "$windows_path"`
19236     new_path="$unix_path"
19237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19239     new_path="$unix_path"
19240   fi
19241 
19242 
19243   # Now try to locate executable using which
19244   new_path=`$WHICH "$new_path" 2> /dev/null`
19245 
19246   if test "x$new_path" = x; then
19247     # Oops. Which didn't find the executable.
19248     # The splitting of arguments from the executable at a space might have been incorrect,
19249     # since paths with space are more likely in Windows. Give it another try with the whole
19250     # argument.
19251     path="$complete"
19252     arguments="EOL"
19253     new_path="$path"
19254 
19255   windows_path="$new_path"
19256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19257     unix_path=`$CYGPATH -u "$windows_path"`
19258     new_path="$unix_path"
19259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19261     new_path="$unix_path"
19262   fi
19263 
19264 
19265     new_path=`$WHICH "$new_path" 2> /dev/null`
19266     # bat and cmd files are not always considered executable in MSYS causing which
19267     # to not find them
19268     if test "x$new_path" = x \
19269         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19270         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19271       new_path="$path"
19272 
19273   windows_path="$new_path"
19274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19275     unix_path=`$CYGPATH -u "$windows_path"`
19276     new_path="$unix_path"
19277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19279     new_path="$unix_path"
19280   fi
19281 
19282     fi
19283 
19284     if test "x$new_path" = x; then
19285       # It's still not found. Now this is an unrecoverable error.
19286       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19287 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19288       has_space=`$ECHO "$complete" | $GREP " "`
19289       if test "x$has_space" != x; then
19290         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19291 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19292       fi
19293       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19294     fi
19295   fi
19296 
19297   # Now new_path has a complete unix path to the binary
19298   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19299     # Keep paths in /bin as-is, but remove trailing .exe if any
19300     new_path="${new_path/%.exe/}"
19301     # Do not save /bin paths to all_fixpath_prefixes!
19302   else
19303     # Not in mixed or Windows style, start by that.
19304     new_path=`cmd //c echo $new_path`
19305 
19306   input_path="$new_path"
19307   # Check if we need to convert this using DOS-style short mode. If the path
19308   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19309   # take no chances and rewrite it.
19310   # Note: m4 eats our [], so we need to use [ and ] instead.
19311   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19312   if test "x$has_forbidden_chars" != x; then
19313     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19314     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19315   fi
19316 
19317     # Output is in $new_path
19318 
19319   windows_path="$new_path"
19320   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19321     unix_path=`$CYGPATH -u "$windows_path"`
19322     new_path="$unix_path"
19323   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19324     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19325     new_path="$unix_path"
19326   fi
19327 
19328     # remove trailing .exe if any
19329     new_path="${new_path/%.exe/}"
19330 
19331     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19332     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19333   fi
19334 
19335     else
19336       # We're on a unix platform. Hooray! :)
19337       # First separate the path from the arguments. This will split at the first
19338       # space.
19339       complete="$FOUND_MAKE"
19340       path="${complete%% *}"
19341       tmp="$complete EOL"
19342       arguments="${tmp#* }"
19343 
19344       # Cannot rely on the command "which" here since it doesn't always work.
19345       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19346       if test -z "$is_absolute_path"; then
19347         # Path to executable is not absolute. Find it.
19348         IFS_save="$IFS"
19349         IFS=:
19350         for p in $PATH; do
19351           if test -f "$p/$path" && test -x "$p/$path"; then
19352             new_path="$p/$path"
19353             break
19354           fi
19355         done
19356         IFS="$IFS_save"
19357       else
19358         # This is an absolute path, we can use it without further modifications.
19359         new_path="$path"
19360       fi
19361 
19362       if test "x$new_path" = x; then
19363         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19364 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19365         has_space=`$ECHO "$complete" | $GREP " "`
19366         if test "x$has_space" != x; then
19367           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19368 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19369         fi
19370         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19371       fi
19372     fi
19373 
19374     # Now join together the path and the arguments once again
19375     if test "x$arguments" != xEOL; then
19376       new_complete="$new_path ${arguments% *}"
19377     else
19378       new_complete="$new_path"
19379     fi
19380 
19381     if test "x$complete" != "x$new_complete"; then
19382       FOUND_MAKE="$new_complete"
19383       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19384 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19385     fi
19386   fi
19387 
19388         fi
19389       fi
19390     fi
19391   fi
19392 
19393         fi
19394         PATH=$OLD_PATH
19395       fi
19396     fi
19397 
19398     if test "x$FOUND_MAKE" = x; then
19399       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
19400     fi
19401 
19402   else
19403     # The variable is set, but is it from the command line or the environment?
19404 
19405     # Try to remove the string !MAKE! from our list.
19406     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19407     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19408       # If it failed, the variable was not from the command line. Ignore it,
19409       # but warn the user (except for BASH, which is always set by the calling BASH).
19410       if test "xMAKE" != xBASH; then
19411         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19412 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19413       fi
19414       # Try to locate tool using the code snippet
19415 
19416     # Try our hardest to locate a correct version of GNU make
19417     for ac_prog in gmake
19418 do
19419   # Extract the first word of "$ac_prog", so it can be a program name with args.
19420 set dummy $ac_prog; ac_word=$2
19421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19422 $as_echo_n "checking for $ac_word... " >&6; }
19423 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19424   $as_echo_n "(cached) " >&6
19425 else
19426   case $CHECK_GMAKE in
19427   [\\/]* | ?:[\\/]*)
19428   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19429   ;;
19430   *)
19431   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19432 for as_dir in $PATH
19433 do
19434   IFS=$as_save_IFS
19435   test -z "$as_dir" && as_dir=.
19436     for ac_exec_ext in '' $ac_executable_extensions; do
19437   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19438     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19439     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19440     break 2
19441   fi
19442 done
19443   done
19444 IFS=$as_save_IFS
19445 
19446   ;;
19447 esac
19448 fi
19449 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19450 if test -n "$CHECK_GMAKE"; then
19451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19452 $as_echo "$CHECK_GMAKE" >&6; }
19453 else
19454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19455 $as_echo "no" >&6; }
19456 fi
19457 
19458 
19459   test -n "$CHECK_GMAKE" && break
19460 done
19461 
19462 
19463   MAKE_CANDIDATE=""$CHECK_GMAKE""
19464   DESCRIPTION="gmake in PATH"
19465 
19466   # On Cygwin, we require a newer version of make than on other platforms
19467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19468     MAKE_VERSION_EXPR="-e 4\."
19469     MAKE_REQUIRED_VERSION="4.0"
19470    else
19471     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19472     MAKE_REQUIRED_VERSION="3.81"
19473   fi
19474 
19475   if test "x$MAKE_CANDIDATE" != x; then
19476     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19477 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19478     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19479     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19480     if test "x$IS_GNU_MAKE" = x; then
19481       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19482 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19483     else
19484       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19485       if test "x$IS_MODERN_MAKE" = x; then
19486         { $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
19487 $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;}
19488       else
19489         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19490           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19491             MAKE_EXPECTED_ENV='cygwin'
19492           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19493             MAKE_EXPECTED_ENV='msys'
19494           else
19495             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19496           fi
19497           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19498           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19499         else
19500           # Not relevant for non-Windows
19501           IS_MAKE_CORRECT_ENV=true
19502         fi
19503         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19504           { $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
19505 $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;}
19506         else
19507           FOUND_MAKE=$MAKE_CANDIDATE
19508 
19509   # Only process if variable expands to non-empty
19510 
19511   if test "x$FOUND_MAKE" != x; then
19512     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19513 
19514   # First separate the path from the arguments. This will split at the first
19515   # space.
19516   complete="$FOUND_MAKE"
19517   path="${complete%% *}"
19518   tmp="$complete EOL"
19519   arguments="${tmp#* }"
19520 
19521   # Input might be given as Windows format, start by converting to
19522   # unix format.
19523   new_path=`$CYGPATH -u "$path"`
19524 
19525   # Now try to locate executable using which
19526   new_path=`$WHICH "$new_path" 2> /dev/null`
19527   # bat and cmd files are not always considered executable in cygwin causing which
19528   # to not find them
19529   if test "x$new_path" = x \
19530       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19531       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19532     new_path=`$CYGPATH -u "$path"`
19533   fi
19534   if test "x$new_path" = x; then
19535     # Oops. Which didn't find the executable.
19536     # The splitting of arguments from the executable at a space might have been incorrect,
19537     # since paths with space are more likely in Windows. Give it another try with the whole
19538     # argument.
19539     path="$complete"
19540     arguments="EOL"
19541     new_path=`$CYGPATH -u "$path"`
19542     new_path=`$WHICH "$new_path" 2> /dev/null`
19543     # bat and cmd files are not always considered executable in cygwin causing which
19544     # to not find them
19545     if test "x$new_path" = x \
19546         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19547         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19548       new_path=`$CYGPATH -u "$path"`
19549     fi
19550     if test "x$new_path" = x; then
19551       # It's still not found. Now this is an unrecoverable error.
19552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19553 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19554       has_space=`$ECHO "$complete" | $GREP " "`
19555       if test "x$has_space" != x; then
19556         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19557 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19558       fi
19559       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19560     fi
19561   fi
19562 
19563   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19564   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19565   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19566   # "foo.exe" is OK but "foo" is an error.
19567   #
19568   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19569   # It is also a way to make sure we got the proper file name for the real test later on.
19570   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19571   if test "x$test_shortpath" = x; then
19572     # Short path failed, file does not exist as specified.
19573     # Try adding .exe or .cmd
19574     if test -f "${new_path}.exe"; then
19575       input_to_shortpath="${new_path}.exe"
19576     elif test -f "${new_path}.cmd"; then
19577       input_to_shortpath="${new_path}.cmd"
19578     else
19579       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19580 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19581       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19582 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19583       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19584     fi
19585   else
19586     input_to_shortpath="$new_path"
19587   fi
19588 
19589   # Call helper function which possibly converts this using DOS-style short mode.
19590   # If so, the updated path is stored in $new_path.
19591   new_path="$input_to_shortpath"
19592 
19593   input_path="$input_to_shortpath"
19594   # Check if we need to convert this using DOS-style short mode. If the path
19595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19596   # take no chances and rewrite it.
19597   # Note: m4 eats our [], so we need to use [ and ] instead.
19598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19599   if test "x$has_forbidden_chars" != x; then
19600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19601     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19602     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19603     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19604       # Going to short mode and back again did indeed matter. Since short mode is
19605       # case insensitive, let's make it lowercase to improve readability.
19606       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19607       # Now convert it back to Unix-style (cygpath)
19608       input_path=`$CYGPATH -u "$shortmode_path"`
19609       new_path="$input_path"
19610     fi
19611   fi
19612 
19613   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19614   if test "x$test_cygdrive_prefix" = x; then
19615     # As a simple fix, exclude /usr/bin since it's not a real path.
19616     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19617       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19618       # a path prefixed by /cygdrive for fixpath to work.
19619       new_path="$CYGWIN_ROOT_PATH$input_path"
19620     fi
19621   fi
19622 
19623   # remove trailing .exe if any
19624   new_path="${new_path/%.exe/}"
19625 
19626     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19627 
19628   # First separate the path from the arguments. This will split at the first
19629   # space.
19630   complete="$FOUND_MAKE"
19631   path="${complete%% *}"
19632   tmp="$complete EOL"
19633   arguments="${tmp#* }"
19634 
19635   # Input might be given as Windows format, start by converting to
19636   # unix format.
19637   new_path="$path"
19638 
19639   windows_path="$new_path"
19640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19641     unix_path=`$CYGPATH -u "$windows_path"`
19642     new_path="$unix_path"
19643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19645     new_path="$unix_path"
19646   fi
19647 
19648 
19649   # Now try to locate executable using which
19650   new_path=`$WHICH "$new_path" 2> /dev/null`
19651 
19652   if test "x$new_path" = x; then
19653     # Oops. Which didn't find the executable.
19654     # The splitting of arguments from the executable at a space might have been incorrect,
19655     # since paths with space are more likely in Windows. Give it another try with the whole
19656     # argument.
19657     path="$complete"
19658     arguments="EOL"
19659     new_path="$path"
19660 
19661   windows_path="$new_path"
19662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19663     unix_path=`$CYGPATH -u "$windows_path"`
19664     new_path="$unix_path"
19665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19667     new_path="$unix_path"
19668   fi
19669 
19670 
19671     new_path=`$WHICH "$new_path" 2> /dev/null`
19672     # bat and cmd files are not always considered executable in MSYS causing which
19673     # to not find them
19674     if test "x$new_path" = x \
19675         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19676         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19677       new_path="$path"
19678 
19679   windows_path="$new_path"
19680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19681     unix_path=`$CYGPATH -u "$windows_path"`
19682     new_path="$unix_path"
19683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19685     new_path="$unix_path"
19686   fi
19687 
19688     fi
19689 
19690     if test "x$new_path" = x; then
19691       # It's still not found. Now this is an unrecoverable error.
19692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19693 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19694       has_space=`$ECHO "$complete" | $GREP " "`
19695       if test "x$has_space" != x; then
19696         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19697 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19698       fi
19699       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19700     fi
19701   fi
19702 
19703   # Now new_path has a complete unix path to the binary
19704   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19705     # Keep paths in /bin as-is, but remove trailing .exe if any
19706     new_path="${new_path/%.exe/}"
19707     # Do not save /bin paths to all_fixpath_prefixes!
19708   else
19709     # Not in mixed or Windows style, start by that.
19710     new_path=`cmd //c echo $new_path`
19711 
19712   input_path="$new_path"
19713   # Check if we need to convert this using DOS-style short mode. If the path
19714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19715   # take no chances and rewrite it.
19716   # Note: m4 eats our [], so we need to use [ and ] instead.
19717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19718   if test "x$has_forbidden_chars" != x; then
19719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19720     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19721   fi
19722 
19723     # Output is in $new_path
19724 
19725   windows_path="$new_path"
19726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19727     unix_path=`$CYGPATH -u "$windows_path"`
19728     new_path="$unix_path"
19729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19731     new_path="$unix_path"
19732   fi
19733 
19734     # remove trailing .exe if any
19735     new_path="${new_path/%.exe/}"
19736 
19737     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19738     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19739   fi
19740 
19741     else
19742       # We're on a unix platform. Hooray! :)
19743       # First separate the path from the arguments. This will split at the first
19744       # space.
19745       complete="$FOUND_MAKE"
19746       path="${complete%% *}"
19747       tmp="$complete EOL"
19748       arguments="${tmp#* }"
19749 
19750       # Cannot rely on the command "which" here since it doesn't always work.
19751       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19752       if test -z "$is_absolute_path"; then
19753         # Path to executable is not absolute. Find it.
19754         IFS_save="$IFS"
19755         IFS=:
19756         for p in $PATH; do
19757           if test -f "$p/$path" && test -x "$p/$path"; then
19758             new_path="$p/$path"
19759             break
19760           fi
19761         done
19762         IFS="$IFS_save"
19763       else
19764         # This is an absolute path, we can use it without further modifications.
19765         new_path="$path"
19766       fi
19767 
19768       if test "x$new_path" = x; then
19769         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19770 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19771         has_space=`$ECHO "$complete" | $GREP " "`
19772         if test "x$has_space" != x; then
19773           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19774 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19775         fi
19776         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19777       fi
19778     fi
19779 
19780     # Now join together the path and the arguments once again
19781     if test "x$arguments" != xEOL; then
19782       new_complete="$new_path ${arguments% *}"
19783     else
19784       new_complete="$new_path"
19785     fi
19786 
19787     if test "x$complete" != "x$new_complete"; then
19788       FOUND_MAKE="$new_complete"
19789       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19790 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19791     fi
19792   fi
19793 
19794         fi
19795       fi
19796     fi
19797   fi
19798 
19799 
19800     if test "x$FOUND_MAKE" = x; then
19801       for ac_prog in make
19802 do
19803   # Extract the first word of "$ac_prog", so it can be a program name with args.
19804 set dummy $ac_prog; ac_word=$2
19805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19806 $as_echo_n "checking for $ac_word... " >&6; }
19807 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19808   $as_echo_n "(cached) " >&6
19809 else
19810   case $CHECK_MAKE in
19811   [\\/]* | ?:[\\/]*)
19812   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19813   ;;
19814   *)
19815   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19816 for as_dir in $PATH
19817 do
19818   IFS=$as_save_IFS
19819   test -z "$as_dir" && as_dir=.
19820     for ac_exec_ext in '' $ac_executable_extensions; do
19821   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19822     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19823     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19824     break 2
19825   fi
19826 done
19827   done
19828 IFS=$as_save_IFS
19829 
19830   ;;
19831 esac
19832 fi
19833 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19834 if test -n "$CHECK_MAKE"; then
19835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19836 $as_echo "$CHECK_MAKE" >&6; }
19837 else
19838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19839 $as_echo "no" >&6; }
19840 fi
19841 
19842 
19843   test -n "$CHECK_MAKE" && break
19844 done
19845 
19846 
19847   MAKE_CANDIDATE=""$CHECK_MAKE""
19848   DESCRIPTION="make in PATH"
19849 
19850   # On Cygwin, we require a newer version of make than on other platforms
19851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19852     MAKE_VERSION_EXPR="-e 4\."
19853     MAKE_REQUIRED_VERSION="4.0"
19854    else
19855     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19856     MAKE_REQUIRED_VERSION="3.81"
19857   fi
19858 
19859   if test "x$MAKE_CANDIDATE" != x; then
19860     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19861 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19862     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19863     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19864     if test "x$IS_GNU_MAKE" = x; then
19865       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19866 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19867     else
19868       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19869       if test "x$IS_MODERN_MAKE" = x; then
19870         { $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
19871 $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;}
19872       else
19873         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19874           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19875             MAKE_EXPECTED_ENV='cygwin'
19876           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19877             MAKE_EXPECTED_ENV='msys'
19878           else
19879             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19880           fi
19881           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19882           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19883         else
19884           # Not relevant for non-Windows
19885           IS_MAKE_CORRECT_ENV=true
19886         fi
19887         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19888           { $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
19889 $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;}
19890         else
19891           FOUND_MAKE=$MAKE_CANDIDATE
19892 
19893   # Only process if variable expands to non-empty
19894 
19895   if test "x$FOUND_MAKE" != x; then
19896     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19897 
19898   # First separate the path from the arguments. This will split at the first
19899   # space.
19900   complete="$FOUND_MAKE"
19901   path="${complete%% *}"
19902   tmp="$complete EOL"
19903   arguments="${tmp#* }"
19904 
19905   # Input might be given as Windows format, start by converting to
19906   # unix format.
19907   new_path=`$CYGPATH -u "$path"`
19908 
19909   # Now try to locate executable using which
19910   new_path=`$WHICH "$new_path" 2> /dev/null`
19911   # bat and cmd files are not always considered executable in cygwin causing which
19912   # to not find them
19913   if test "x$new_path" = x \
19914       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19915       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19916     new_path=`$CYGPATH -u "$path"`
19917   fi
19918   if test "x$new_path" = x; then
19919     # Oops. Which didn't find the executable.
19920     # The splitting of arguments from the executable at a space might have been incorrect,
19921     # since paths with space are more likely in Windows. Give it another try with the whole
19922     # argument.
19923     path="$complete"
19924     arguments="EOL"
19925     new_path=`$CYGPATH -u "$path"`
19926     new_path=`$WHICH "$new_path" 2> /dev/null`
19927     # bat and cmd files are not always considered executable in cygwin causing which
19928     # to not find them
19929     if test "x$new_path" = x \
19930         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19931         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19932       new_path=`$CYGPATH -u "$path"`
19933     fi
19934     if test "x$new_path" = x; then
19935       # It's still not found. Now this is an unrecoverable error.
19936       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19937 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19938       has_space=`$ECHO "$complete" | $GREP " "`
19939       if test "x$has_space" != x; then
19940         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19941 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19942       fi
19943       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19944     fi
19945   fi
19946 
19947   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19948   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19949   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19950   # "foo.exe" is OK but "foo" is an error.
19951   #
19952   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19953   # It is also a way to make sure we got the proper file name for the real test later on.
19954   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19955   if test "x$test_shortpath" = x; then
19956     # Short path failed, file does not exist as specified.
19957     # Try adding .exe or .cmd
19958     if test -f "${new_path}.exe"; then
19959       input_to_shortpath="${new_path}.exe"
19960     elif test -f "${new_path}.cmd"; then
19961       input_to_shortpath="${new_path}.cmd"
19962     else
19963       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19964 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19965       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19966 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19967       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19968     fi
19969   else
19970     input_to_shortpath="$new_path"
19971   fi
19972 
19973   # Call helper function which possibly converts this using DOS-style short mode.
19974   # If so, the updated path is stored in $new_path.
19975   new_path="$input_to_shortpath"
19976 
19977   input_path="$input_to_shortpath"
19978   # Check if we need to convert this using DOS-style short mode. If the path
19979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19980   # take no chances and rewrite it.
19981   # Note: m4 eats our [], so we need to use [ and ] instead.
19982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19983   if test "x$has_forbidden_chars" != x; then
19984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19985     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19986     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19987     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19988       # Going to short mode and back again did indeed matter. Since short mode is
19989       # case insensitive, let's make it lowercase to improve readability.
19990       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19991       # Now convert it back to Unix-style (cygpath)
19992       input_path=`$CYGPATH -u "$shortmode_path"`
19993       new_path="$input_path"
19994     fi
19995   fi
19996 
19997   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19998   if test "x$test_cygdrive_prefix" = x; then
19999     # As a simple fix, exclude /usr/bin since it's not a real path.
20000     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20001       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20002       # a path prefixed by /cygdrive for fixpath to work.
20003       new_path="$CYGWIN_ROOT_PATH$input_path"
20004     fi
20005   fi
20006 
20007   # remove trailing .exe if any
20008   new_path="${new_path/%.exe/}"
20009 
20010     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20011 
20012   # First separate the path from the arguments. This will split at the first
20013   # space.
20014   complete="$FOUND_MAKE"
20015   path="${complete%% *}"
20016   tmp="$complete EOL"
20017   arguments="${tmp#* }"
20018 
20019   # Input might be given as Windows format, start by converting to
20020   # unix format.
20021   new_path="$path"
20022 
20023   windows_path="$new_path"
20024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20025     unix_path=`$CYGPATH -u "$windows_path"`
20026     new_path="$unix_path"
20027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20029     new_path="$unix_path"
20030   fi
20031 
20032 
20033   # Now try to locate executable using which
20034   new_path=`$WHICH "$new_path" 2> /dev/null`
20035 
20036   if test "x$new_path" = x; then
20037     # Oops. Which didn't find the executable.
20038     # The splitting of arguments from the executable at a space might have been incorrect,
20039     # since paths with space are more likely in Windows. Give it another try with the whole
20040     # argument.
20041     path="$complete"
20042     arguments="EOL"
20043     new_path="$path"
20044 
20045   windows_path="$new_path"
20046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20047     unix_path=`$CYGPATH -u "$windows_path"`
20048     new_path="$unix_path"
20049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20051     new_path="$unix_path"
20052   fi
20053 
20054 
20055     new_path=`$WHICH "$new_path" 2> /dev/null`
20056     # bat and cmd files are not always considered executable in MSYS causing which
20057     # to not find them
20058     if test "x$new_path" = x \
20059         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20060         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20061       new_path="$path"
20062 
20063   windows_path="$new_path"
20064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20065     unix_path=`$CYGPATH -u "$windows_path"`
20066     new_path="$unix_path"
20067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20069     new_path="$unix_path"
20070   fi
20071 
20072     fi
20073 
20074     if test "x$new_path" = x; then
20075       # It's still not found. Now this is an unrecoverable error.
20076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20077 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20078       has_space=`$ECHO "$complete" | $GREP " "`
20079       if test "x$has_space" != x; then
20080         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20081 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20082       fi
20083       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20084     fi
20085   fi
20086 
20087   # Now new_path has a complete unix path to the binary
20088   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20089     # Keep paths in /bin as-is, but remove trailing .exe if any
20090     new_path="${new_path/%.exe/}"
20091     # Do not save /bin paths to all_fixpath_prefixes!
20092   else
20093     # Not in mixed or Windows style, start by that.
20094     new_path=`cmd //c echo $new_path`
20095 
20096   input_path="$new_path"
20097   # Check if we need to convert this using DOS-style short mode. If the path
20098   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20099   # take no chances and rewrite it.
20100   # Note: m4 eats our [], so we need to use [ and ] instead.
20101   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20102   if test "x$has_forbidden_chars" != x; then
20103     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20104     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20105   fi
20106 
20107     # Output is in $new_path
20108 
20109   windows_path="$new_path"
20110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20111     unix_path=`$CYGPATH -u "$windows_path"`
20112     new_path="$unix_path"
20113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20115     new_path="$unix_path"
20116   fi
20117 
20118     # remove trailing .exe if any
20119     new_path="${new_path/%.exe/}"
20120 
20121     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20122     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20123   fi
20124 
20125     else
20126       # We're on a unix platform. Hooray! :)
20127       # First separate the path from the arguments. This will split at the first
20128       # space.
20129       complete="$FOUND_MAKE"
20130       path="${complete%% *}"
20131       tmp="$complete EOL"
20132       arguments="${tmp#* }"
20133 
20134       # Cannot rely on the command "which" here since it doesn't always work.
20135       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20136       if test -z "$is_absolute_path"; then
20137         # Path to executable is not absolute. Find it.
20138         IFS_save="$IFS"
20139         IFS=:
20140         for p in $PATH; do
20141           if test -f "$p/$path" && test -x "$p/$path"; then
20142             new_path="$p/$path"
20143             break
20144           fi
20145         done
20146         IFS="$IFS_save"
20147       else
20148         # This is an absolute path, we can use it without further modifications.
20149         new_path="$path"
20150       fi
20151 
20152       if test "x$new_path" = x; then
20153         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20154 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20155         has_space=`$ECHO "$complete" | $GREP " "`
20156         if test "x$has_space" != x; then
20157           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20158 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20159         fi
20160         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20161       fi
20162     fi
20163 
20164     # Now join together the path and the arguments once again
20165     if test "x$arguments" != xEOL; then
20166       new_complete="$new_path ${arguments% *}"
20167     else
20168       new_complete="$new_path"
20169     fi
20170 
20171     if test "x$complete" != "x$new_complete"; then
20172       FOUND_MAKE="$new_complete"
20173       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20174 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20175     fi
20176   fi
20177 
20178         fi
20179       fi
20180     fi
20181   fi
20182 
20183     fi
20184 
20185     if test "x$FOUND_MAKE" = x; then
20186       if test "x$TOOLCHAIN_PATH" != x; then
20187         # We have a toolchain path, check that as well before giving up.
20188         OLD_PATH=$PATH
20189         PATH=$TOOLCHAIN_PATH:$PATH
20190         for ac_prog in gmake
20191 do
20192   # Extract the first word of "$ac_prog", so it can be a program name with args.
20193 set dummy $ac_prog; ac_word=$2
20194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20195 $as_echo_n "checking for $ac_word... " >&6; }
20196 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20197   $as_echo_n "(cached) " >&6
20198 else
20199   case $CHECK_TOOLSDIR_GMAKE in
20200   [\\/]* | ?:[\\/]*)
20201   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20202   ;;
20203   *)
20204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20205 for as_dir in $PATH
20206 do
20207   IFS=$as_save_IFS
20208   test -z "$as_dir" && as_dir=.
20209     for ac_exec_ext in '' $ac_executable_extensions; do
20210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20211     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20213     break 2
20214   fi
20215 done
20216   done
20217 IFS=$as_save_IFS
20218 
20219   ;;
20220 esac
20221 fi
20222 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20223 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20225 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20226 else
20227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20228 $as_echo "no" >&6; }
20229 fi
20230 
20231 
20232   test -n "$CHECK_TOOLSDIR_GMAKE" && break
20233 done
20234 
20235 
20236   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20237   DESCRIPTION="gmake in tools-dir"
20238 
20239   # On Cygwin, we require a newer version of make than on other platforms
20240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20241     MAKE_VERSION_EXPR="-e 4\."
20242     MAKE_REQUIRED_VERSION="4.0"
20243    else
20244     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20245     MAKE_REQUIRED_VERSION="3.81"
20246   fi
20247 
20248   if test "x$MAKE_CANDIDATE" != x; then
20249     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20250 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20251     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20252     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20253     if test "x$IS_GNU_MAKE" = x; then
20254       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20255 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20256     else
20257       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20258       if test "x$IS_MODERN_MAKE" = x; then
20259         { $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
20260 $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;}
20261       else
20262         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20263           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20264             MAKE_EXPECTED_ENV='cygwin'
20265           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20266             MAKE_EXPECTED_ENV='msys'
20267           else
20268             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20269           fi
20270           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20271           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20272         else
20273           # Not relevant for non-Windows
20274           IS_MAKE_CORRECT_ENV=true
20275         fi
20276         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20277           { $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
20278 $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;}
20279         else
20280           FOUND_MAKE=$MAKE_CANDIDATE
20281 
20282   # Only process if variable expands to non-empty
20283 
20284   if test "x$FOUND_MAKE" != x; then
20285     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20286 
20287   # First separate the path from the arguments. This will split at the first
20288   # space.
20289   complete="$FOUND_MAKE"
20290   path="${complete%% *}"
20291   tmp="$complete EOL"
20292   arguments="${tmp#* }"
20293 
20294   # Input might be given as Windows format, start by converting to
20295   # unix format.
20296   new_path=`$CYGPATH -u "$path"`
20297 
20298   # Now try to locate executable using which
20299   new_path=`$WHICH "$new_path" 2> /dev/null`
20300   # bat and cmd files are not always considered executable in cygwin causing which
20301   # to not find them
20302   if test "x$new_path" = x \
20303       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20304       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20305     new_path=`$CYGPATH -u "$path"`
20306   fi
20307   if test "x$new_path" = x; then
20308     # Oops. Which didn't find the executable.
20309     # The splitting of arguments from the executable at a space might have been incorrect,
20310     # since paths with space are more likely in Windows. Give it another try with the whole
20311     # argument.
20312     path="$complete"
20313     arguments="EOL"
20314     new_path=`$CYGPATH -u "$path"`
20315     new_path=`$WHICH "$new_path" 2> /dev/null`
20316     # bat and cmd files are not always considered executable in cygwin causing which
20317     # to not find them
20318     if test "x$new_path" = x \
20319         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20320         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20321       new_path=`$CYGPATH -u "$path"`
20322     fi
20323     if test "x$new_path" = x; then
20324       # It's still not found. Now this is an unrecoverable error.
20325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20326 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20327       has_space=`$ECHO "$complete" | $GREP " "`
20328       if test "x$has_space" != x; then
20329         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20330 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20331       fi
20332       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20333     fi
20334   fi
20335 
20336   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20337   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20338   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20339   # "foo.exe" is OK but "foo" is an error.
20340   #
20341   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20342   # It is also a way to make sure we got the proper file name for the real test later on.
20343   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20344   if test "x$test_shortpath" = x; then
20345     # Short path failed, file does not exist as specified.
20346     # Try adding .exe or .cmd
20347     if test -f "${new_path}.exe"; then
20348       input_to_shortpath="${new_path}.exe"
20349     elif test -f "${new_path}.cmd"; then
20350       input_to_shortpath="${new_path}.cmd"
20351     else
20352       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20353 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20354       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20355 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20356       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20357     fi
20358   else
20359     input_to_shortpath="$new_path"
20360   fi
20361 
20362   # Call helper function which possibly converts this using DOS-style short mode.
20363   # If so, the updated path is stored in $new_path.
20364   new_path="$input_to_shortpath"
20365 
20366   input_path="$input_to_shortpath"
20367   # Check if we need to convert this using DOS-style short mode. If the path
20368   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20369   # take no chances and rewrite it.
20370   # Note: m4 eats our [], so we need to use [ and ] instead.
20371   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20372   if test "x$has_forbidden_chars" != x; then
20373     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20374     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20375     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20376     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20377       # Going to short mode and back again did indeed matter. Since short mode is
20378       # case insensitive, let's make it lowercase to improve readability.
20379       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20380       # Now convert it back to Unix-style (cygpath)
20381       input_path=`$CYGPATH -u "$shortmode_path"`
20382       new_path="$input_path"
20383     fi
20384   fi
20385 
20386   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20387   if test "x$test_cygdrive_prefix" = x; then
20388     # As a simple fix, exclude /usr/bin since it's not a real path.
20389     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20390       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20391       # a path prefixed by /cygdrive for fixpath to work.
20392       new_path="$CYGWIN_ROOT_PATH$input_path"
20393     fi
20394   fi
20395 
20396   # remove trailing .exe if any
20397   new_path="${new_path/%.exe/}"
20398 
20399     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20400 
20401   # First separate the path from the arguments. This will split at the first
20402   # space.
20403   complete="$FOUND_MAKE"
20404   path="${complete%% *}"
20405   tmp="$complete EOL"
20406   arguments="${tmp#* }"
20407 
20408   # Input might be given as Windows format, start by converting to
20409   # unix format.
20410   new_path="$path"
20411 
20412   windows_path="$new_path"
20413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20414     unix_path=`$CYGPATH -u "$windows_path"`
20415     new_path="$unix_path"
20416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20418     new_path="$unix_path"
20419   fi
20420 
20421 
20422   # Now try to locate executable using which
20423   new_path=`$WHICH "$new_path" 2> /dev/null`
20424 
20425   if test "x$new_path" = x; then
20426     # Oops. Which didn't find the executable.
20427     # The splitting of arguments from the executable at a space might have been incorrect,
20428     # since paths with space are more likely in Windows. Give it another try with the whole
20429     # argument.
20430     path="$complete"
20431     arguments="EOL"
20432     new_path="$path"
20433 
20434   windows_path="$new_path"
20435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20436     unix_path=`$CYGPATH -u "$windows_path"`
20437     new_path="$unix_path"
20438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20440     new_path="$unix_path"
20441   fi
20442 
20443 
20444     new_path=`$WHICH "$new_path" 2> /dev/null`
20445     # bat and cmd files are not always considered executable in MSYS causing which
20446     # to not find them
20447     if test "x$new_path" = x \
20448         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20449         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20450       new_path="$path"
20451 
20452   windows_path="$new_path"
20453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20454     unix_path=`$CYGPATH -u "$windows_path"`
20455     new_path="$unix_path"
20456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20458     new_path="$unix_path"
20459   fi
20460 
20461     fi
20462 
20463     if test "x$new_path" = x; then
20464       # It's still not found. Now this is an unrecoverable error.
20465       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20466 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20467       has_space=`$ECHO "$complete" | $GREP " "`
20468       if test "x$has_space" != x; then
20469         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20470 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20471       fi
20472       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20473     fi
20474   fi
20475 
20476   # Now new_path has a complete unix path to the binary
20477   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20478     # Keep paths in /bin as-is, but remove trailing .exe if any
20479     new_path="${new_path/%.exe/}"
20480     # Do not save /bin paths to all_fixpath_prefixes!
20481   else
20482     # Not in mixed or Windows style, start by that.
20483     new_path=`cmd //c echo $new_path`
20484 
20485   input_path="$new_path"
20486   # Check if we need to convert this using DOS-style short mode. If the path
20487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20488   # take no chances and rewrite it.
20489   # Note: m4 eats our [], so we need to use [ and ] instead.
20490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20491   if test "x$has_forbidden_chars" != x; then
20492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20493     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20494   fi
20495 
20496     # Output is in $new_path
20497 
20498   windows_path="$new_path"
20499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20500     unix_path=`$CYGPATH -u "$windows_path"`
20501     new_path="$unix_path"
20502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20504     new_path="$unix_path"
20505   fi
20506 
20507     # remove trailing .exe if any
20508     new_path="${new_path/%.exe/}"
20509 
20510     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20511     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20512   fi
20513 
20514     else
20515       # We're on a unix platform. Hooray! :)
20516       # First separate the path from the arguments. This will split at the first
20517       # space.
20518       complete="$FOUND_MAKE"
20519       path="${complete%% *}"
20520       tmp="$complete EOL"
20521       arguments="${tmp#* }"
20522 
20523       # Cannot rely on the command "which" here since it doesn't always work.
20524       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20525       if test -z "$is_absolute_path"; then
20526         # Path to executable is not absolute. Find it.
20527         IFS_save="$IFS"
20528         IFS=:
20529         for p in $PATH; do
20530           if test -f "$p/$path" && test -x "$p/$path"; then
20531             new_path="$p/$path"
20532             break
20533           fi
20534         done
20535         IFS="$IFS_save"
20536       else
20537         # This is an absolute path, we can use it without further modifications.
20538         new_path="$path"
20539       fi
20540 
20541       if test "x$new_path" = x; then
20542         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20543 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20544         has_space=`$ECHO "$complete" | $GREP " "`
20545         if test "x$has_space" != x; then
20546           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20547 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20548         fi
20549         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20550       fi
20551     fi
20552 
20553     # Now join together the path and the arguments once again
20554     if test "x$arguments" != xEOL; then
20555       new_complete="$new_path ${arguments% *}"
20556     else
20557       new_complete="$new_path"
20558     fi
20559 
20560     if test "x$complete" != "x$new_complete"; then
20561       FOUND_MAKE="$new_complete"
20562       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20563 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20564     fi
20565   fi
20566 
20567         fi
20568       fi
20569     fi
20570   fi
20571 
20572         if test "x$FOUND_MAKE" = x; then
20573           for ac_prog in make
20574 do
20575   # Extract the first word of "$ac_prog", so it can be a program name with args.
20576 set dummy $ac_prog; ac_word=$2
20577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20578 $as_echo_n "checking for $ac_word... " >&6; }
20579 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20580   $as_echo_n "(cached) " >&6
20581 else
20582   case $CHECK_TOOLSDIR_MAKE in
20583   [\\/]* | ?:[\\/]*)
20584   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20585   ;;
20586   *)
20587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20588 for as_dir in $PATH
20589 do
20590   IFS=$as_save_IFS
20591   test -z "$as_dir" && as_dir=.
20592     for ac_exec_ext in '' $ac_executable_extensions; do
20593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20594     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20596     break 2
20597   fi
20598 done
20599   done
20600 IFS=$as_save_IFS
20601 
20602   ;;
20603 esac
20604 fi
20605 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20606 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20608 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20609 else
20610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20611 $as_echo "no" >&6; }
20612 fi
20613 
20614 
20615   test -n "$CHECK_TOOLSDIR_MAKE" && break
20616 done
20617 
20618 
20619   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20620   DESCRIPTION="make in tools-dir"
20621 
20622   # On Cygwin, we require a newer version of make than on other platforms
20623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20624     MAKE_VERSION_EXPR="-e 4\."
20625     MAKE_REQUIRED_VERSION="4.0"
20626    else
20627     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20628     MAKE_REQUIRED_VERSION="3.81"
20629   fi
20630 
20631   if test "x$MAKE_CANDIDATE" != x; then
20632     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20633 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20634     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20635     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20636     if test "x$IS_GNU_MAKE" = x; then
20637       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20638 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20639     else
20640       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20641       if test "x$IS_MODERN_MAKE" = x; then
20642         { $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
20643 $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;}
20644       else
20645         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20646           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20647             MAKE_EXPECTED_ENV='cygwin'
20648           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20649             MAKE_EXPECTED_ENV='msys'
20650           else
20651             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20652           fi
20653           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20654           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20655         else
20656           # Not relevant for non-Windows
20657           IS_MAKE_CORRECT_ENV=true
20658         fi
20659         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20660           { $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
20661 $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;}
20662         else
20663           FOUND_MAKE=$MAKE_CANDIDATE
20664 
20665   # Only process if variable expands to non-empty
20666 
20667   if test "x$FOUND_MAKE" != x; then
20668     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20669 
20670   # First separate the path from the arguments. This will split at the first
20671   # space.
20672   complete="$FOUND_MAKE"
20673   path="${complete%% *}"
20674   tmp="$complete EOL"
20675   arguments="${tmp#* }"
20676 
20677   # Input might be given as Windows format, start by converting to
20678   # unix format.
20679   new_path=`$CYGPATH -u "$path"`
20680 
20681   # Now try to locate executable using which
20682   new_path=`$WHICH "$new_path" 2> /dev/null`
20683   # bat and cmd files are not always considered executable in cygwin causing which
20684   # to not find them
20685   if test "x$new_path" = x \
20686       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20687       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20688     new_path=`$CYGPATH -u "$path"`
20689   fi
20690   if test "x$new_path" = x; then
20691     # Oops. Which didn't find the executable.
20692     # The splitting of arguments from the executable at a space might have been incorrect,
20693     # since paths with space are more likely in Windows. Give it another try with the whole
20694     # argument.
20695     path="$complete"
20696     arguments="EOL"
20697     new_path=`$CYGPATH -u "$path"`
20698     new_path=`$WHICH "$new_path" 2> /dev/null`
20699     # bat and cmd files are not always considered executable in cygwin causing which
20700     # to not find them
20701     if test "x$new_path" = x \
20702         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20703         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20704       new_path=`$CYGPATH -u "$path"`
20705     fi
20706     if test "x$new_path" = x; then
20707       # It's still not found. Now this is an unrecoverable error.
20708       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20709 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20710       has_space=`$ECHO "$complete" | $GREP " "`
20711       if test "x$has_space" != x; then
20712         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20713 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20714       fi
20715       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20716     fi
20717   fi
20718 
20719   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20720   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20721   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20722   # "foo.exe" is OK but "foo" is an error.
20723   #
20724   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20725   # It is also a way to make sure we got the proper file name for the real test later on.
20726   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20727   if test "x$test_shortpath" = x; then
20728     # Short path failed, file does not exist as specified.
20729     # Try adding .exe or .cmd
20730     if test -f "${new_path}.exe"; then
20731       input_to_shortpath="${new_path}.exe"
20732     elif test -f "${new_path}.cmd"; then
20733       input_to_shortpath="${new_path}.cmd"
20734     else
20735       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20736 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20737       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20738 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20739       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20740     fi
20741   else
20742     input_to_shortpath="$new_path"
20743   fi
20744 
20745   # Call helper function which possibly converts this using DOS-style short mode.
20746   # If so, the updated path is stored in $new_path.
20747   new_path="$input_to_shortpath"
20748 
20749   input_path="$input_to_shortpath"
20750   # Check if we need to convert this using DOS-style short mode. If the path
20751   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20752   # take no chances and rewrite it.
20753   # Note: m4 eats our [], so we need to use [ and ] instead.
20754   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20755   if test "x$has_forbidden_chars" != x; then
20756     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20757     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20758     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20759     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20760       # Going to short mode and back again did indeed matter. Since short mode is
20761       # case insensitive, let's make it lowercase to improve readability.
20762       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20763       # Now convert it back to Unix-style (cygpath)
20764       input_path=`$CYGPATH -u "$shortmode_path"`
20765       new_path="$input_path"
20766     fi
20767   fi
20768 
20769   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20770   if test "x$test_cygdrive_prefix" = x; then
20771     # As a simple fix, exclude /usr/bin since it's not a real path.
20772     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20773       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20774       # a path prefixed by /cygdrive for fixpath to work.
20775       new_path="$CYGWIN_ROOT_PATH$input_path"
20776     fi
20777   fi
20778 
20779   # remove trailing .exe if any
20780   new_path="${new_path/%.exe/}"
20781 
20782     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20783 
20784   # First separate the path from the arguments. This will split at the first
20785   # space.
20786   complete="$FOUND_MAKE"
20787   path="${complete%% *}"
20788   tmp="$complete EOL"
20789   arguments="${tmp#* }"
20790 
20791   # Input might be given as Windows format, start by converting to
20792   # unix format.
20793   new_path="$path"
20794 
20795   windows_path="$new_path"
20796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20797     unix_path=`$CYGPATH -u "$windows_path"`
20798     new_path="$unix_path"
20799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20801     new_path="$unix_path"
20802   fi
20803 
20804 
20805   # Now try to locate executable using which
20806   new_path=`$WHICH "$new_path" 2> /dev/null`
20807 
20808   if test "x$new_path" = x; then
20809     # Oops. Which didn't find the executable.
20810     # The splitting of arguments from the executable at a space might have been incorrect,
20811     # since paths with space are more likely in Windows. Give it another try with the whole
20812     # argument.
20813     path="$complete"
20814     arguments="EOL"
20815     new_path="$path"
20816 
20817   windows_path="$new_path"
20818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20819     unix_path=`$CYGPATH -u "$windows_path"`
20820     new_path="$unix_path"
20821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20823     new_path="$unix_path"
20824   fi
20825 
20826 
20827     new_path=`$WHICH "$new_path" 2> /dev/null`
20828     # bat and cmd files are not always considered executable in MSYS causing which
20829     # to not find them
20830     if test "x$new_path" = x \
20831         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20832         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20833       new_path="$path"
20834 
20835   windows_path="$new_path"
20836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20837     unix_path=`$CYGPATH -u "$windows_path"`
20838     new_path="$unix_path"
20839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20841     new_path="$unix_path"
20842   fi
20843 
20844     fi
20845 
20846     if test "x$new_path" = x; then
20847       # It's still not found. Now this is an unrecoverable error.
20848       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20849 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20850       has_space=`$ECHO "$complete" | $GREP " "`
20851       if test "x$has_space" != x; then
20852         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20853 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20854       fi
20855       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20856     fi
20857   fi
20858 
20859   # Now new_path has a complete unix path to the binary
20860   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20861     # Keep paths in /bin as-is, but remove trailing .exe if any
20862     new_path="${new_path/%.exe/}"
20863     # Do not save /bin paths to all_fixpath_prefixes!
20864   else
20865     # Not in mixed or Windows style, start by that.
20866     new_path=`cmd //c echo $new_path`
20867 
20868   input_path="$new_path"
20869   # Check if we need to convert this using DOS-style short mode. If the path
20870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20871   # take no chances and rewrite it.
20872   # Note: m4 eats our [], so we need to use [ and ] instead.
20873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20874   if test "x$has_forbidden_chars" != x; then
20875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20876     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20877   fi
20878 
20879     # Output is in $new_path
20880 
20881   windows_path="$new_path"
20882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20883     unix_path=`$CYGPATH -u "$windows_path"`
20884     new_path="$unix_path"
20885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20887     new_path="$unix_path"
20888   fi
20889 
20890     # remove trailing .exe if any
20891     new_path="${new_path/%.exe/}"
20892 
20893     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20894     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20895   fi
20896 
20897     else
20898       # We're on a unix platform. Hooray! :)
20899       # First separate the path from the arguments. This will split at the first
20900       # space.
20901       complete="$FOUND_MAKE"
20902       path="${complete%% *}"
20903       tmp="$complete EOL"
20904       arguments="${tmp#* }"
20905 
20906       # Cannot rely on the command "which" here since it doesn't always work.
20907       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20908       if test -z "$is_absolute_path"; then
20909         # Path to executable is not absolute. Find it.
20910         IFS_save="$IFS"
20911         IFS=:
20912         for p in $PATH; do
20913           if test -f "$p/$path" && test -x "$p/$path"; then
20914             new_path="$p/$path"
20915             break
20916           fi
20917         done
20918         IFS="$IFS_save"
20919       else
20920         # This is an absolute path, we can use it without further modifications.
20921         new_path="$path"
20922       fi
20923 
20924       if test "x$new_path" = x; then
20925         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20926 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20927         has_space=`$ECHO "$complete" | $GREP " "`
20928         if test "x$has_space" != x; then
20929           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20930 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20931         fi
20932         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20933       fi
20934     fi
20935 
20936     # Now join together the path and the arguments once again
20937     if test "x$arguments" != xEOL; then
20938       new_complete="$new_path ${arguments% *}"
20939     else
20940       new_complete="$new_path"
20941     fi
20942 
20943     if test "x$complete" != "x$new_complete"; then
20944       FOUND_MAKE="$new_complete"
20945       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20946 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20947     fi
20948   fi
20949 
20950         fi
20951       fi
20952     fi
20953   fi
20954 
20955         fi
20956         PATH=$OLD_PATH
20957       fi
20958     fi
20959 
20960     if test "x$FOUND_MAKE" = x; then
20961       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
20962     fi
20963 
20964     else
20965       # If it succeeded, then it was overridden by the user. We will use it
20966       # for the tool.
20967 
20968       # First remove it from the list of overridden variables, so we can test
20969       # for unknown variables in the end.
20970       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20971 
20972       # Check if we try to supply an empty value
20973       if test "x$MAKE" = x; then
20974         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20975 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20976         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20977 $as_echo_n "checking for MAKE... " >&6; }
20978         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20979 $as_echo "disabled" >&6; }
20980       else
20981         # Check if the provided tool contains a complete path.
20982         tool_specified="$MAKE"
20983         tool_basename="${tool_specified##*/}"
20984         if test "x$tool_basename" = "x$tool_specified"; then
20985           # A command without a complete path is provided, search $PATH.
20986           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20987 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20988           # Extract the first word of "$tool_basename", so it can be a program name with args.
20989 set dummy $tool_basename; ac_word=$2
20990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20991 $as_echo_n "checking for $ac_word... " >&6; }
20992 if ${ac_cv_path_MAKE+:} false; then :
20993   $as_echo_n "(cached) " >&6
20994 else
20995   case $MAKE in
20996   [\\/]* | ?:[\\/]*)
20997   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20998   ;;
20999   *)
21000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21001 for as_dir in $PATH
21002 do
21003   IFS=$as_save_IFS
21004   test -z "$as_dir" && as_dir=.
21005     for ac_exec_ext in '' $ac_executable_extensions; do
21006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21007     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
21008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21009     break 2
21010   fi
21011 done
21012   done
21013 IFS=$as_save_IFS
21014 
21015   ;;
21016 esac
21017 fi
21018 MAKE=$ac_cv_path_MAKE
21019 if test -n "$MAKE"; then
21020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
21021 $as_echo "$MAKE" >&6; }
21022 else
21023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21024 $as_echo "no" >&6; }
21025 fi
21026 
21027 
21028           if test "x$MAKE" = x; then
21029             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21030           fi
21031         else
21032           # Otherwise we believe it is a complete path. Use it as it is.
21033           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
21034 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
21035           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21036 $as_echo_n "checking for MAKE... " >&6; }
21037           if test ! -x "$tool_specified"; then
21038             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21039 $as_echo "not found" >&6; }
21040             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
21041           fi
21042           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21043 $as_echo "$tool_specified" >&6; }
21044         fi
21045       fi
21046     fi
21047 
21048     # If MAKE was set by user, verify the version
21049 
21050   MAKE_CANDIDATE=""$MAKE""
21051   DESCRIPTION="user supplied MAKE=$MAKE"
21052 
21053   # On Cygwin, we require a newer version of make than on other platforms
21054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21055     MAKE_VERSION_EXPR="-e 4\."
21056     MAKE_REQUIRED_VERSION="4.0"
21057    else
21058     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21059     MAKE_REQUIRED_VERSION="3.81"
21060   fi
21061 
21062   if test "x$MAKE_CANDIDATE" != x; then
21063     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21064 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21065     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21066     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21067     if test "x$IS_GNU_MAKE" = x; then
21068       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21069 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21070     else
21071       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21072       if test "x$IS_MODERN_MAKE" = x; then
21073         { $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
21074 $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;}
21075       else
21076         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21077           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21078             MAKE_EXPECTED_ENV='cygwin'
21079           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21080             MAKE_EXPECTED_ENV='msys'
21081           else
21082             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21083           fi
21084           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21085           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21086         else
21087           # Not relevant for non-Windows
21088           IS_MAKE_CORRECT_ENV=true
21089         fi
21090         if test "x$IS_MAKE_CORRECT_ENV" = x; then
21091           { $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
21092 $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;}
21093         else
21094           FOUND_MAKE=$MAKE_CANDIDATE
21095 
21096   # Only process if variable expands to non-empty
21097 
21098   if test "x$FOUND_MAKE" != x; then
21099     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21100 
21101   # First separate the path from the arguments. This will split at the first
21102   # space.
21103   complete="$FOUND_MAKE"
21104   path="${complete%% *}"
21105   tmp="$complete EOL"
21106   arguments="${tmp#* }"
21107 
21108   # Input might be given as Windows format, start by converting to
21109   # unix format.
21110   new_path=`$CYGPATH -u "$path"`
21111 
21112   # Now try to locate executable using which
21113   new_path=`$WHICH "$new_path" 2> /dev/null`
21114   # bat and cmd files are not always considered executable in cygwin causing which
21115   # to not find them
21116   if test "x$new_path" = x \
21117       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21118       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21119     new_path=`$CYGPATH -u "$path"`
21120   fi
21121   if test "x$new_path" = x; then
21122     # Oops. Which didn't find the executable.
21123     # The splitting of arguments from the executable at a space might have been incorrect,
21124     # since paths with space are more likely in Windows. Give it another try with the whole
21125     # argument.
21126     path="$complete"
21127     arguments="EOL"
21128     new_path=`$CYGPATH -u "$path"`
21129     new_path=`$WHICH "$new_path" 2> /dev/null`
21130     # bat and cmd files are not always considered executable in cygwin causing which
21131     # to not find them
21132     if test "x$new_path" = x \
21133         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21134         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21135       new_path=`$CYGPATH -u "$path"`
21136     fi
21137     if test "x$new_path" = x; then
21138       # It's still not found. Now this is an unrecoverable error.
21139       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21140 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21141       has_space=`$ECHO "$complete" | $GREP " "`
21142       if test "x$has_space" != x; then
21143         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21144 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21145       fi
21146       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21147     fi
21148   fi
21149 
21150   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21151   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21152   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21153   # "foo.exe" is OK but "foo" is an error.
21154   #
21155   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21156   # It is also a way to make sure we got the proper file name for the real test later on.
21157   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21158   if test "x$test_shortpath" = x; then
21159     # Short path failed, file does not exist as specified.
21160     # Try adding .exe or .cmd
21161     if test -f "${new_path}.exe"; then
21162       input_to_shortpath="${new_path}.exe"
21163     elif test -f "${new_path}.cmd"; then
21164       input_to_shortpath="${new_path}.cmd"
21165     else
21166       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21167 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21168       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21169 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21170       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21171     fi
21172   else
21173     input_to_shortpath="$new_path"
21174   fi
21175 
21176   # Call helper function which possibly converts this using DOS-style short mode.
21177   # If so, the updated path is stored in $new_path.
21178   new_path="$input_to_shortpath"
21179 
21180   input_path="$input_to_shortpath"
21181   # Check if we need to convert this using DOS-style short mode. If the path
21182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21183   # take no chances and rewrite it.
21184   # Note: m4 eats our [], so we need to use [ and ] instead.
21185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21186   if test "x$has_forbidden_chars" != x; then
21187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21188     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21189     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21190     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21191       # Going to short mode and back again did indeed matter. Since short mode is
21192       # case insensitive, let's make it lowercase to improve readability.
21193       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21194       # Now convert it back to Unix-style (cygpath)
21195       input_path=`$CYGPATH -u "$shortmode_path"`
21196       new_path="$input_path"
21197     fi
21198   fi
21199 
21200   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21201   if test "x$test_cygdrive_prefix" = x; then
21202     # As a simple fix, exclude /usr/bin since it's not a real path.
21203     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21204       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21205       # a path prefixed by /cygdrive for fixpath to work.
21206       new_path="$CYGWIN_ROOT_PATH$input_path"
21207     fi
21208   fi
21209 
21210   # remove trailing .exe if any
21211   new_path="${new_path/%.exe/}"
21212 
21213     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21214 
21215   # First separate the path from the arguments. This will split at the first
21216   # space.
21217   complete="$FOUND_MAKE"
21218   path="${complete%% *}"
21219   tmp="$complete EOL"
21220   arguments="${tmp#* }"
21221 
21222   # Input might be given as Windows format, start by converting to
21223   # unix format.
21224   new_path="$path"
21225 
21226   windows_path="$new_path"
21227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21228     unix_path=`$CYGPATH -u "$windows_path"`
21229     new_path="$unix_path"
21230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21231     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21232     new_path="$unix_path"
21233   fi
21234 
21235 
21236   # Now try to locate executable using which
21237   new_path=`$WHICH "$new_path" 2> /dev/null`
21238 
21239   if test "x$new_path" = x; then
21240     # Oops. Which didn't find the executable.
21241     # The splitting of arguments from the executable at a space might have been incorrect,
21242     # since paths with space are more likely in Windows. Give it another try with the whole
21243     # argument.
21244     path="$complete"
21245     arguments="EOL"
21246     new_path="$path"
21247 
21248   windows_path="$new_path"
21249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21250     unix_path=`$CYGPATH -u "$windows_path"`
21251     new_path="$unix_path"
21252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21254     new_path="$unix_path"
21255   fi
21256 
21257 
21258     new_path=`$WHICH "$new_path" 2> /dev/null`
21259     # bat and cmd files are not always considered executable in MSYS causing which
21260     # to not find them
21261     if test "x$new_path" = x \
21262         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21263         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21264       new_path="$path"
21265 
21266   windows_path="$new_path"
21267   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21268     unix_path=`$CYGPATH -u "$windows_path"`
21269     new_path="$unix_path"
21270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21271     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21272     new_path="$unix_path"
21273   fi
21274 
21275     fi
21276 
21277     if test "x$new_path" = x; then
21278       # It's still not found. Now this is an unrecoverable error.
21279       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21280 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21281       has_space=`$ECHO "$complete" | $GREP " "`
21282       if test "x$has_space" != x; then
21283         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21284 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21285       fi
21286       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21287     fi
21288   fi
21289 
21290   # Now new_path has a complete unix path to the binary
21291   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21292     # Keep paths in /bin as-is, but remove trailing .exe if any
21293     new_path="${new_path/%.exe/}"
21294     # Do not save /bin paths to all_fixpath_prefixes!
21295   else
21296     # Not in mixed or Windows style, start by that.
21297     new_path=`cmd //c echo $new_path`
21298 
21299   input_path="$new_path"
21300   # Check if we need to convert this using DOS-style short mode. If the path
21301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21302   # take no chances and rewrite it.
21303   # Note: m4 eats our [], so we need to use [ and ] instead.
21304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21305   if test "x$has_forbidden_chars" != x; then
21306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21307     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21308   fi
21309 
21310     # Output is in $new_path
21311 
21312   windows_path="$new_path"
21313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21314     unix_path=`$CYGPATH -u "$windows_path"`
21315     new_path="$unix_path"
21316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21318     new_path="$unix_path"
21319   fi
21320 
21321     # remove trailing .exe if any
21322     new_path="${new_path/%.exe/}"
21323 
21324     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21325     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21326   fi
21327 
21328     else
21329       # We're on a unix platform. Hooray! :)
21330       # First separate the path from the arguments. This will split at the first
21331       # space.
21332       complete="$FOUND_MAKE"
21333       path="${complete%% *}"
21334       tmp="$complete EOL"
21335       arguments="${tmp#* }"
21336 
21337       # Cannot rely on the command "which" here since it doesn't always work.
21338       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21339       if test -z "$is_absolute_path"; then
21340         # Path to executable is not absolute. Find it.
21341         IFS_save="$IFS"
21342         IFS=:
21343         for p in $PATH; do
21344           if test -f "$p/$path" && test -x "$p/$path"; then
21345             new_path="$p/$path"
21346             break
21347           fi
21348         done
21349         IFS="$IFS_save"
21350       else
21351         # This is an absolute path, we can use it without further modifications.
21352         new_path="$path"
21353       fi
21354 
21355       if test "x$new_path" = x; then
21356         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21357 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21358         has_space=`$ECHO "$complete" | $GREP " "`
21359         if test "x$has_space" != x; then
21360           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21361 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21362         fi
21363         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21364       fi
21365     fi
21366 
21367     # Now join together the path and the arguments once again
21368     if test "x$arguments" != xEOL; then
21369       new_complete="$new_path ${arguments% *}"
21370     else
21371       new_complete="$new_path"
21372     fi
21373 
21374     if test "x$complete" != "x$new_complete"; then
21375       FOUND_MAKE="$new_complete"
21376       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21377 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21378     fi
21379   fi
21380 
21381         fi
21382       fi
21383     fi
21384   fi
21385 
21386     if test "x$FOUND_MAKE" = x; then
21387       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21388     fi
21389 
21390   fi
21391 
21392 
21393   MAKE=$FOUND_MAKE
21394 
21395   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21396 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21397 
21398 
21399   # Check if make supports the output sync option and if so, setup using it.
21400   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21401 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21402   if $MAKE --version -O > /dev/null 2>&1; then
21403     OUTPUT_SYNC_SUPPORTED=true
21404     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21405 $as_echo "yes" >&6; }
21406     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21407 $as_echo_n "checking for output-sync value... " >&6; }
21408 
21409 # Check whether --with-output-sync was given.
21410 if test "${with_output_sync+set}" = set; then :
21411   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21412 fi
21413 
21414     if test "x$OUTPUT_SYNC" = "x"; then
21415       OUTPUT_SYNC=none
21416     fi
21417     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21418 $as_echo "$OUTPUT_SYNC" >&6; }
21419     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21420       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21421     fi
21422   else
21423     OUTPUT_SYNC_SUPPORTED=false
21424     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21425 $as_echo "no" >&6; }
21426   fi
21427 
21428 
21429 
21430 
21431 
21432 
21433   # Test if find supports -delete
21434   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21435 $as_echo_n "checking if find supports -delete... " >&6; }
21436   FIND_DELETE="-delete"
21437 
21438   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21439 
21440   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21441 
21442   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21443   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21444     # No, it does not.
21445     $RM $DELETEDIR/TestIfFindSupportsDelete
21446     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21447       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21448       FIND_DELETE="-print | $XARGS $RM"
21449     else
21450       FIND_DELETE="-exec $RM \{\} \+"
21451     fi
21452     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21453 $as_echo "no" >&6; }
21454   else
21455     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21456 $as_echo "yes" >&6; }
21457   fi
21458   $RMDIR $DELETEDIR
21459 
21460 
21461 
21462   # Test which kind of tar was found
21463   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21464     TAR_TYPE="gnu"
21465   elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21466     TAR_TYPE="bsd"
21467   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21468     TAR_TYPE="bsd"
21469   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21470     TAR_TYPE="solaris"
21471   fi
21472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21473 $as_echo_n "checking what type of tar was found... " >&6; }
21474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21475 $as_echo "$TAR_TYPE" >&6; }
21476 
21477   TAR_CREATE_FILE_PARAM=""
21478 
21479   if test "x$TAR_TYPE" = "xgnu"; then
21480     TAR_INCLUDE_PARAM="T"
21481     TAR_SUPPORTS_TRANSFORM="true"
21482     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21483       # When using gnu tar for Solaris targets, need to use compatibility mode
21484       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21485     fi
21486   else
21487     TAR_INCLUDE_PARAM="I"
21488     TAR_SUPPORTS_TRANSFORM="false"
21489   fi
21490 
21491 
21492 
21493 
21494 
21495 
21496   # Test that grep supports -Fx with a list of pattern which includes null pattern.
21497   # This is a problem for the grep resident on AIX.
21498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21499 $as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21500   # Multiple subsequent spaces..
21501   STACK_SPACES='aaa   bbb   ccc'
21502   # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21503   # patterns in it.
21504   STACK_LIST=${STACK_SPACES// /$'\n'}
21505   NEEDLE_SPACES='ccc bbb aaa'
21506   NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21507   RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21508   if test "x$RESULT" == "x"; then
21509     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21510 $as_echo "yes" >&6; }
21511   else
21512     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21513       ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21514     fi
21515     as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21516   fi
21517 
21518 
21519   # These tools might not be installed by default,
21520   # need hint on how to install them.
21521 
21522 
21523 
21524   # Publish this variable in the help.
21525 
21526 
21527   if [ -z "${UNZIP+x}" ]; then
21528     # The variable is not set by user, try to locate tool using the code snippet
21529     for ac_prog in unzip
21530 do
21531   # Extract the first word of "$ac_prog", so it can be a program name with args.
21532 set dummy $ac_prog; ac_word=$2
21533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21534 $as_echo_n "checking for $ac_word... " >&6; }
21535 if ${ac_cv_path_UNZIP+:} false; then :
21536   $as_echo_n "(cached) " >&6
21537 else
21538   case $UNZIP in
21539   [\\/]* | ?:[\\/]*)
21540   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21541   ;;
21542   *)
21543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21544 for as_dir in $PATH
21545 do
21546   IFS=$as_save_IFS
21547   test -z "$as_dir" && as_dir=.
21548     for ac_exec_ext in '' $ac_executable_extensions; do
21549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21550     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21552     break 2
21553   fi
21554 done
21555   done
21556 IFS=$as_save_IFS
21557 
21558   ;;
21559 esac
21560 fi
21561 UNZIP=$ac_cv_path_UNZIP
21562 if test -n "$UNZIP"; then
21563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21564 $as_echo "$UNZIP" >&6; }
21565 else
21566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21567 $as_echo "no" >&6; }
21568 fi
21569 
21570 
21571   test -n "$UNZIP" && break
21572 done
21573 
21574   else
21575     # The variable is set, but is it from the command line or the environment?
21576 
21577     # Try to remove the string !UNZIP! from our list.
21578     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21579     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21580       # If it failed, the variable was not from the command line. Ignore it,
21581       # but warn the user (except for BASH, which is always set by the calling BASH).
21582       if test "xUNZIP" != xBASH; then
21583         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21584 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21585       fi
21586       # Try to locate tool using the code snippet
21587       for ac_prog in unzip
21588 do
21589   # Extract the first word of "$ac_prog", so it can be a program name with args.
21590 set dummy $ac_prog; ac_word=$2
21591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21592 $as_echo_n "checking for $ac_word... " >&6; }
21593 if ${ac_cv_path_UNZIP+:} false; then :
21594   $as_echo_n "(cached) " >&6
21595 else
21596   case $UNZIP in
21597   [\\/]* | ?:[\\/]*)
21598   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21599   ;;
21600   *)
21601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21602 for as_dir in $PATH
21603 do
21604   IFS=$as_save_IFS
21605   test -z "$as_dir" && as_dir=.
21606     for ac_exec_ext in '' $ac_executable_extensions; do
21607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21608     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21610     break 2
21611   fi
21612 done
21613   done
21614 IFS=$as_save_IFS
21615 
21616   ;;
21617 esac
21618 fi
21619 UNZIP=$ac_cv_path_UNZIP
21620 if test -n "$UNZIP"; then
21621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21622 $as_echo "$UNZIP" >&6; }
21623 else
21624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21625 $as_echo "no" >&6; }
21626 fi
21627 
21628 
21629   test -n "$UNZIP" && break
21630 done
21631 
21632     else
21633       # If it succeeded, then it was overridden by the user. We will use it
21634       # for the tool.
21635 
21636       # First remove it from the list of overridden variables, so we can test
21637       # for unknown variables in the end.
21638       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21639 
21640       # Check if we try to supply an empty value
21641       if test "x$UNZIP" = x; then
21642         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21643 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21644         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21645 $as_echo_n "checking for UNZIP... " >&6; }
21646         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21647 $as_echo "disabled" >&6; }
21648       else
21649         # Check if the provided tool contains a complete path.
21650         tool_specified="$UNZIP"
21651         tool_basename="${tool_specified##*/}"
21652         if test "x$tool_basename" = "x$tool_specified"; then
21653           # A command without a complete path is provided, search $PATH.
21654           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21655 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21656           # Extract the first word of "$tool_basename", so it can be a program name with args.
21657 set dummy $tool_basename; ac_word=$2
21658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21659 $as_echo_n "checking for $ac_word... " >&6; }
21660 if ${ac_cv_path_UNZIP+:} false; then :
21661   $as_echo_n "(cached) " >&6
21662 else
21663   case $UNZIP in
21664   [\\/]* | ?:[\\/]*)
21665   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21666   ;;
21667   *)
21668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21669 for as_dir in $PATH
21670 do
21671   IFS=$as_save_IFS
21672   test -z "$as_dir" && as_dir=.
21673     for ac_exec_ext in '' $ac_executable_extensions; do
21674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21675     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21677     break 2
21678   fi
21679 done
21680   done
21681 IFS=$as_save_IFS
21682 
21683   ;;
21684 esac
21685 fi
21686 UNZIP=$ac_cv_path_UNZIP
21687 if test -n "$UNZIP"; then
21688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21689 $as_echo "$UNZIP" >&6; }
21690 else
21691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21692 $as_echo "no" >&6; }
21693 fi
21694 
21695 
21696           if test "x$UNZIP" = x; then
21697             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21698           fi
21699         else
21700           # Otherwise we believe it is a complete path. Use it as it is.
21701           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21702 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21703           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21704 $as_echo_n "checking for UNZIP... " >&6; }
21705           if test ! -x "$tool_specified"; then
21706             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21707 $as_echo "not found" >&6; }
21708             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21709           fi
21710           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21711 $as_echo "$tool_specified" >&6; }
21712         fi
21713       fi
21714     fi
21715 
21716   fi
21717 
21718 
21719 
21720   if test "x$UNZIP" = x; then
21721     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21722   fi
21723 
21724 
21725   # Since zip uses "ZIP" as a environment variable for passing options, we need
21726   # to name our variable differently, hence ZIPEXE.
21727 
21728 
21729 
21730   # Publish this variable in the help.
21731 
21732 
21733   if [ -z "${ZIPEXE+x}" ]; then
21734     # The variable is not set by user, try to locate tool using the code snippet
21735     for ac_prog in zip
21736 do
21737   # Extract the first word of "$ac_prog", so it can be a program name with args.
21738 set dummy $ac_prog; ac_word=$2
21739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21740 $as_echo_n "checking for $ac_word... " >&6; }
21741 if ${ac_cv_path_ZIPEXE+:} false; then :
21742   $as_echo_n "(cached) " >&6
21743 else
21744   case $ZIPEXE in
21745   [\\/]* | ?:[\\/]*)
21746   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21747   ;;
21748   *)
21749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21750 for as_dir in $PATH
21751 do
21752   IFS=$as_save_IFS
21753   test -z "$as_dir" && as_dir=.
21754     for ac_exec_ext in '' $ac_executable_extensions; do
21755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21756     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21758     break 2
21759   fi
21760 done
21761   done
21762 IFS=$as_save_IFS
21763 
21764   ;;
21765 esac
21766 fi
21767 ZIPEXE=$ac_cv_path_ZIPEXE
21768 if test -n "$ZIPEXE"; then
21769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21770 $as_echo "$ZIPEXE" >&6; }
21771 else
21772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21773 $as_echo "no" >&6; }
21774 fi
21775 
21776 
21777   test -n "$ZIPEXE" && break
21778 done
21779 
21780   else
21781     # The variable is set, but is it from the command line or the environment?
21782 
21783     # Try to remove the string !ZIPEXE! from our list.
21784     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21785     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21786       # If it failed, the variable was not from the command line. Ignore it,
21787       # but warn the user (except for BASH, which is always set by the calling BASH).
21788       if test "xZIPEXE" != xBASH; then
21789         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21790 $as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21791       fi
21792       # Try to locate tool using the code snippet
21793       for ac_prog in zip
21794 do
21795   # Extract the first word of "$ac_prog", so it can be a program name with args.
21796 set dummy $ac_prog; ac_word=$2
21797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21798 $as_echo_n "checking for $ac_word... " >&6; }
21799 if ${ac_cv_path_ZIPEXE+:} false; then :
21800   $as_echo_n "(cached) " >&6
21801 else
21802   case $ZIPEXE in
21803   [\\/]* | ?:[\\/]*)
21804   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21805   ;;
21806   *)
21807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21808 for as_dir in $PATH
21809 do
21810   IFS=$as_save_IFS
21811   test -z "$as_dir" && as_dir=.
21812     for ac_exec_ext in '' $ac_executable_extensions; do
21813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21814     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21816     break 2
21817   fi
21818 done
21819   done
21820 IFS=$as_save_IFS
21821 
21822   ;;
21823 esac
21824 fi
21825 ZIPEXE=$ac_cv_path_ZIPEXE
21826 if test -n "$ZIPEXE"; then
21827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21828 $as_echo "$ZIPEXE" >&6; }
21829 else
21830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21831 $as_echo "no" >&6; }
21832 fi
21833 
21834 
21835   test -n "$ZIPEXE" && break
21836 done
21837 
21838     else
21839       # If it succeeded, then it was overridden by the user. We will use it
21840       # for the tool.
21841 
21842       # First remove it from the list of overridden variables, so we can test
21843       # for unknown variables in the end.
21844       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21845 
21846       # Check if we try to supply an empty value
21847       if test "x$ZIPEXE" = x; then
21848         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21849 $as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21850         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21851 $as_echo_n "checking for ZIPEXE... " >&6; }
21852         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21853 $as_echo "disabled" >&6; }
21854       else
21855         # Check if the provided tool contains a complete path.
21856         tool_specified="$ZIPEXE"
21857         tool_basename="${tool_specified##*/}"
21858         if test "x$tool_basename" = "x$tool_specified"; then
21859           # A command without a complete path is provided, search $PATH.
21860           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21861 $as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21862           # Extract the first word of "$tool_basename", so it can be a program name with args.
21863 set dummy $tool_basename; ac_word=$2
21864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21865 $as_echo_n "checking for $ac_word... " >&6; }
21866 if ${ac_cv_path_ZIPEXE+:} false; then :
21867   $as_echo_n "(cached) " >&6
21868 else
21869   case $ZIPEXE in
21870   [\\/]* | ?:[\\/]*)
21871   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21872   ;;
21873   *)
21874   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21875 for as_dir in $PATH
21876 do
21877   IFS=$as_save_IFS
21878   test -z "$as_dir" && as_dir=.
21879     for ac_exec_ext in '' $ac_executable_extensions; do
21880   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21881     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21882     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21883     break 2
21884   fi
21885 done
21886   done
21887 IFS=$as_save_IFS
21888 
21889   ;;
21890 esac
21891 fi
21892 ZIPEXE=$ac_cv_path_ZIPEXE
21893 if test -n "$ZIPEXE"; then
21894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21895 $as_echo "$ZIPEXE" >&6; }
21896 else
21897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21898 $as_echo "no" >&6; }
21899 fi
21900 
21901 
21902           if test "x$ZIPEXE" = x; then
21903             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21904           fi
21905         else
21906           # Otherwise we believe it is a complete path. Use it as it is.
21907           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21908 $as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21909           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21910 $as_echo_n "checking for ZIPEXE... " >&6; }
21911           if test ! -x "$tool_specified"; then
21912             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21913 $as_echo "not found" >&6; }
21914             as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21915           fi
21916           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21917 $as_echo "$tool_specified" >&6; }
21918         fi
21919       fi
21920     fi
21921 
21922   fi
21923 
21924 
21925 
21926   if test "x$ZIPEXE" = x; then
21927     as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21928   fi
21929 
21930 
21931 
21932   # Non-required basic tools
21933 
21934 
21935 
21936   # Publish this variable in the help.
21937 
21938 
21939   if [ -z "${LDD+x}" ]; then
21940     # The variable is not set by user, try to locate tool using the code snippet
21941     for ac_prog in ldd
21942 do
21943   # Extract the first word of "$ac_prog", so it can be a program name with args.
21944 set dummy $ac_prog; ac_word=$2
21945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21946 $as_echo_n "checking for $ac_word... " >&6; }
21947 if ${ac_cv_path_LDD+:} false; then :
21948   $as_echo_n "(cached) " >&6
21949 else
21950   case $LDD in
21951   [\\/]* | ?:[\\/]*)
21952   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21953   ;;
21954   *)
21955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21956 for as_dir in $PATH
21957 do
21958   IFS=$as_save_IFS
21959   test -z "$as_dir" && as_dir=.
21960     for ac_exec_ext in '' $ac_executable_extensions; do
21961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21962     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21964     break 2
21965   fi
21966 done
21967   done
21968 IFS=$as_save_IFS
21969 
21970   ;;
21971 esac
21972 fi
21973 LDD=$ac_cv_path_LDD
21974 if test -n "$LDD"; then
21975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21976 $as_echo "$LDD" >&6; }
21977 else
21978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21979 $as_echo "no" >&6; }
21980 fi
21981 
21982 
21983   test -n "$LDD" && break
21984 done
21985 
21986   else
21987     # The variable is set, but is it from the command line or the environment?
21988 
21989     # Try to remove the string !LDD! from our list.
21990     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21991     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21992       # If it failed, the variable was not from the command line. Ignore it,
21993       # but warn the user (except for BASH, which is always set by the calling BASH).
21994       if test "xLDD" != xBASH; then
21995         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21996 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21997       fi
21998       # Try to locate tool using the code snippet
21999       for ac_prog in ldd
22000 do
22001   # Extract the first word of "$ac_prog", so it can be a program name with args.
22002 set dummy $ac_prog; ac_word=$2
22003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22004 $as_echo_n "checking for $ac_word... " >&6; }
22005 if ${ac_cv_path_LDD+:} false; then :
22006   $as_echo_n "(cached) " >&6
22007 else
22008   case $LDD in
22009   [\\/]* | ?:[\\/]*)
22010   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22011   ;;
22012   *)
22013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22014 for as_dir in $PATH
22015 do
22016   IFS=$as_save_IFS
22017   test -z "$as_dir" && as_dir=.
22018     for ac_exec_ext in '' $ac_executable_extensions; do
22019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22020     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22022     break 2
22023   fi
22024 done
22025   done
22026 IFS=$as_save_IFS
22027 
22028   ;;
22029 esac
22030 fi
22031 LDD=$ac_cv_path_LDD
22032 if test -n "$LDD"; then
22033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22034 $as_echo "$LDD" >&6; }
22035 else
22036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22037 $as_echo "no" >&6; }
22038 fi
22039 
22040 
22041   test -n "$LDD" && break
22042 done
22043 
22044     else
22045       # If it succeeded, then it was overridden by the user. We will use it
22046       # for the tool.
22047 
22048       # First remove it from the list of overridden variables, so we can test
22049       # for unknown variables in the end.
22050       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22051 
22052       # Check if we try to supply an empty value
22053       if test "x$LDD" = x; then
22054         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22055 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22056         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22057 $as_echo_n "checking for LDD... " >&6; }
22058         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22059 $as_echo "disabled" >&6; }
22060       else
22061         # Check if the provided tool contains a complete path.
22062         tool_specified="$LDD"
22063         tool_basename="${tool_specified##*/}"
22064         if test "x$tool_basename" = "x$tool_specified"; then
22065           # A command without a complete path is provided, search $PATH.
22066           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22067 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22068           # Extract the first word of "$tool_basename", so it can be a program name with args.
22069 set dummy $tool_basename; ac_word=$2
22070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22071 $as_echo_n "checking for $ac_word... " >&6; }
22072 if ${ac_cv_path_LDD+:} false; then :
22073   $as_echo_n "(cached) " >&6
22074 else
22075   case $LDD in
22076   [\\/]* | ?:[\\/]*)
22077   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22078   ;;
22079   *)
22080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22081 for as_dir in $PATH
22082 do
22083   IFS=$as_save_IFS
22084   test -z "$as_dir" && as_dir=.
22085     for ac_exec_ext in '' $ac_executable_extensions; do
22086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22087     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22089     break 2
22090   fi
22091 done
22092   done
22093 IFS=$as_save_IFS
22094 
22095   ;;
22096 esac
22097 fi
22098 LDD=$ac_cv_path_LDD
22099 if test -n "$LDD"; then
22100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22101 $as_echo "$LDD" >&6; }
22102 else
22103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22104 $as_echo "no" >&6; }
22105 fi
22106 
22107 
22108           if test "x$LDD" = x; then
22109             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22110           fi
22111         else
22112           # Otherwise we believe it is a complete path. Use it as it is.
22113           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22114 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22115           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22116 $as_echo_n "checking for LDD... " >&6; }
22117           if test ! -x "$tool_specified"; then
22118             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22119 $as_echo "not found" >&6; }
22120             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22121           fi
22122           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22123 $as_echo "$tool_specified" >&6; }
22124         fi
22125       fi
22126     fi
22127 
22128   fi
22129 
22130 
22131   if test "x$LDD" = "x"; then
22132     # List shared lib dependencies is used for
22133     # debug output and checking for forbidden dependencies.
22134     # We can build without it.
22135     LDD="true"
22136   fi
22137 
22138 
22139   # Publish this variable in the help.
22140 
22141 
22142   if [ -z "${OTOOL+x}" ]; then
22143     # The variable is not set by user, try to locate tool using the code snippet
22144     for ac_prog in otool
22145 do
22146   # Extract the first word of "$ac_prog", so it can be a program name with args.
22147 set dummy $ac_prog; ac_word=$2
22148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22149 $as_echo_n "checking for $ac_word... " >&6; }
22150 if ${ac_cv_path_OTOOL+:} false; then :
22151   $as_echo_n "(cached) " >&6
22152 else
22153   case $OTOOL in
22154   [\\/]* | ?:[\\/]*)
22155   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22156   ;;
22157   *)
22158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22159 for as_dir in $PATH
22160 do
22161   IFS=$as_save_IFS
22162   test -z "$as_dir" && as_dir=.
22163     for ac_exec_ext in '' $ac_executable_extensions; do
22164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22165     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22167     break 2
22168   fi
22169 done
22170   done
22171 IFS=$as_save_IFS
22172 
22173   ;;
22174 esac
22175 fi
22176 OTOOL=$ac_cv_path_OTOOL
22177 if test -n "$OTOOL"; then
22178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22179 $as_echo "$OTOOL" >&6; }
22180 else
22181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22182 $as_echo "no" >&6; }
22183 fi
22184 
22185 
22186   test -n "$OTOOL" && break
22187 done
22188 
22189   else
22190     # The variable is set, but is it from the command line or the environment?
22191 
22192     # Try to remove the string !OTOOL! from our list.
22193     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22194     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22195       # If it failed, the variable was not from the command line. Ignore it,
22196       # but warn the user (except for BASH, which is always set by the calling BASH).
22197       if test "xOTOOL" != xBASH; then
22198         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22199 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22200       fi
22201       # Try to locate tool using the code snippet
22202       for ac_prog in otool
22203 do
22204   # Extract the first word of "$ac_prog", so it can be a program name with args.
22205 set dummy $ac_prog; ac_word=$2
22206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22207 $as_echo_n "checking for $ac_word... " >&6; }
22208 if ${ac_cv_path_OTOOL+:} false; then :
22209   $as_echo_n "(cached) " >&6
22210 else
22211   case $OTOOL in
22212   [\\/]* | ?:[\\/]*)
22213   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22214   ;;
22215   *)
22216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22217 for as_dir in $PATH
22218 do
22219   IFS=$as_save_IFS
22220   test -z "$as_dir" && as_dir=.
22221     for ac_exec_ext in '' $ac_executable_extensions; do
22222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22223     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22225     break 2
22226   fi
22227 done
22228   done
22229 IFS=$as_save_IFS
22230 
22231   ;;
22232 esac
22233 fi
22234 OTOOL=$ac_cv_path_OTOOL
22235 if test -n "$OTOOL"; then
22236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22237 $as_echo "$OTOOL" >&6; }
22238 else
22239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22240 $as_echo "no" >&6; }
22241 fi
22242 
22243 
22244   test -n "$OTOOL" && break
22245 done
22246 
22247     else
22248       # If it succeeded, then it was overridden by the user. We will use it
22249       # for the tool.
22250 
22251       # First remove it from the list of overridden variables, so we can test
22252       # for unknown variables in the end.
22253       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22254 
22255       # Check if we try to supply an empty value
22256       if test "x$OTOOL" = x; then
22257         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22258 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22259         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22260 $as_echo_n "checking for OTOOL... " >&6; }
22261         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22262 $as_echo "disabled" >&6; }
22263       else
22264         # Check if the provided tool contains a complete path.
22265         tool_specified="$OTOOL"
22266         tool_basename="${tool_specified##*/}"
22267         if test "x$tool_basename" = "x$tool_specified"; then
22268           # A command without a complete path is provided, search $PATH.
22269           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22270 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22271           # Extract the first word of "$tool_basename", so it can be a program name with args.
22272 set dummy $tool_basename; ac_word=$2
22273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22274 $as_echo_n "checking for $ac_word... " >&6; }
22275 if ${ac_cv_path_OTOOL+:} false; then :
22276   $as_echo_n "(cached) " >&6
22277 else
22278   case $OTOOL in
22279   [\\/]* | ?:[\\/]*)
22280   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22281   ;;
22282   *)
22283   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22284 for as_dir in $PATH
22285 do
22286   IFS=$as_save_IFS
22287   test -z "$as_dir" && as_dir=.
22288     for ac_exec_ext in '' $ac_executable_extensions; do
22289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22290     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22292     break 2
22293   fi
22294 done
22295   done
22296 IFS=$as_save_IFS
22297 
22298   ;;
22299 esac
22300 fi
22301 OTOOL=$ac_cv_path_OTOOL
22302 if test -n "$OTOOL"; then
22303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22304 $as_echo "$OTOOL" >&6; }
22305 else
22306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22307 $as_echo "no" >&6; }
22308 fi
22309 
22310 
22311           if test "x$OTOOL" = x; then
22312             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22313           fi
22314         else
22315           # Otherwise we believe it is a complete path. Use it as it is.
22316           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22317 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22318           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22319 $as_echo_n "checking for OTOOL... " >&6; }
22320           if test ! -x "$tool_specified"; then
22321             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22322 $as_echo "not found" >&6; }
22323             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22324           fi
22325           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22326 $as_echo "$tool_specified" >&6; }
22327         fi
22328       fi
22329     fi
22330 
22331   fi
22332 
22333 
22334   if test "x$OTOOL" = "x"; then
22335     OTOOL="true"
22336   fi
22337 
22338 
22339   # Publish this variable in the help.
22340 
22341 
22342   if [ -z "${READELF+x}" ]; then
22343     # The variable is not set by user, try to locate tool using the code snippet
22344     for ac_prog in greadelf readelf
22345 do
22346   # Extract the first word of "$ac_prog", so it can be a program name with args.
22347 set dummy $ac_prog; ac_word=$2
22348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22349 $as_echo_n "checking for $ac_word... " >&6; }
22350 if ${ac_cv_path_READELF+:} false; then :
22351   $as_echo_n "(cached) " >&6
22352 else
22353   case $READELF in
22354   [\\/]* | ?:[\\/]*)
22355   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22356   ;;
22357   *)
22358   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22359 for as_dir in $PATH
22360 do
22361   IFS=$as_save_IFS
22362   test -z "$as_dir" && as_dir=.
22363     for ac_exec_ext in '' $ac_executable_extensions; do
22364   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22365     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22367     break 2
22368   fi
22369 done
22370   done
22371 IFS=$as_save_IFS
22372 
22373   ;;
22374 esac
22375 fi
22376 READELF=$ac_cv_path_READELF
22377 if test -n "$READELF"; then
22378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22379 $as_echo "$READELF" >&6; }
22380 else
22381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22382 $as_echo "no" >&6; }
22383 fi
22384 
22385 
22386   test -n "$READELF" && break
22387 done
22388 
22389   else
22390     # The variable is set, but is it from the command line or the environment?
22391 
22392     # Try to remove the string !READELF! from our list.
22393     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22394     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22395       # If it failed, the variable was not from the command line. Ignore it,
22396       # but warn the user (except for BASH, which is always set by the calling BASH).
22397       if test "xREADELF" != xBASH; then
22398         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22399 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22400       fi
22401       # Try to locate tool using the code snippet
22402       for ac_prog in greadelf readelf
22403 do
22404   # Extract the first word of "$ac_prog", so it can be a program name with args.
22405 set dummy $ac_prog; ac_word=$2
22406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22407 $as_echo_n "checking for $ac_word... " >&6; }
22408 if ${ac_cv_path_READELF+:} false; then :
22409   $as_echo_n "(cached) " >&6
22410 else
22411   case $READELF in
22412   [\\/]* | ?:[\\/]*)
22413   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22414   ;;
22415   *)
22416   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22417 for as_dir in $PATH
22418 do
22419   IFS=$as_save_IFS
22420   test -z "$as_dir" && as_dir=.
22421     for ac_exec_ext in '' $ac_executable_extensions; do
22422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22423     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22425     break 2
22426   fi
22427 done
22428   done
22429 IFS=$as_save_IFS
22430 
22431   ;;
22432 esac
22433 fi
22434 READELF=$ac_cv_path_READELF
22435 if test -n "$READELF"; then
22436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22437 $as_echo "$READELF" >&6; }
22438 else
22439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22440 $as_echo "no" >&6; }
22441 fi
22442 
22443 
22444   test -n "$READELF" && break
22445 done
22446 
22447     else
22448       # If it succeeded, then it was overridden by the user. We will use it
22449       # for the tool.
22450 
22451       # First remove it from the list of overridden variables, so we can test
22452       # for unknown variables in the end.
22453       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22454 
22455       # Check if we try to supply an empty value
22456       if test "x$READELF" = x; then
22457         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22458 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22459         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22460 $as_echo_n "checking for READELF... " >&6; }
22461         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22462 $as_echo "disabled" >&6; }
22463       else
22464         # Check if the provided tool contains a complete path.
22465         tool_specified="$READELF"
22466         tool_basename="${tool_specified##*/}"
22467         if test "x$tool_basename" = "x$tool_specified"; then
22468           # A command without a complete path is provided, search $PATH.
22469           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22470 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22471           # Extract the first word of "$tool_basename", so it can be a program name with args.
22472 set dummy $tool_basename; ac_word=$2
22473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22474 $as_echo_n "checking for $ac_word... " >&6; }
22475 if ${ac_cv_path_READELF+:} false; then :
22476   $as_echo_n "(cached) " >&6
22477 else
22478   case $READELF in
22479   [\\/]* | ?:[\\/]*)
22480   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22481   ;;
22482   *)
22483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22484 for as_dir in $PATH
22485 do
22486   IFS=$as_save_IFS
22487   test -z "$as_dir" && as_dir=.
22488     for ac_exec_ext in '' $ac_executable_extensions; do
22489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22490     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22492     break 2
22493   fi
22494 done
22495   done
22496 IFS=$as_save_IFS
22497 
22498   ;;
22499 esac
22500 fi
22501 READELF=$ac_cv_path_READELF
22502 if test -n "$READELF"; then
22503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22504 $as_echo "$READELF" >&6; }
22505 else
22506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22507 $as_echo "no" >&6; }
22508 fi
22509 
22510 
22511           if test "x$READELF" = x; then
22512             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22513           fi
22514         else
22515           # Otherwise we believe it is a complete path. Use it as it is.
22516           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22517 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22518           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22519 $as_echo_n "checking for READELF... " >&6; }
22520           if test ! -x "$tool_specified"; then
22521             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22522 $as_echo "not found" >&6; }
22523             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22524           fi
22525           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22526 $as_echo "$tool_specified" >&6; }
22527         fi
22528       fi
22529     fi
22530 
22531   fi
22532 
22533 
22534 
22535 
22536   # Publish this variable in the help.
22537 
22538 
22539   if [ -z "${DOT+x}" ]; then
22540     # The variable is not set by user, try to locate tool using the code snippet
22541     for ac_prog in dot
22542 do
22543   # Extract the first word of "$ac_prog", so it can be a program name with args.
22544 set dummy $ac_prog; ac_word=$2
22545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22546 $as_echo_n "checking for $ac_word... " >&6; }
22547 if ${ac_cv_path_DOT+:} false; then :
22548   $as_echo_n "(cached) " >&6
22549 else
22550   case $DOT in
22551   [\\/]* | ?:[\\/]*)
22552   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22553   ;;
22554   *)
22555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22556 for as_dir in $PATH
22557 do
22558   IFS=$as_save_IFS
22559   test -z "$as_dir" && as_dir=.
22560     for ac_exec_ext in '' $ac_executable_extensions; do
22561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22562     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22564     break 2
22565   fi
22566 done
22567   done
22568 IFS=$as_save_IFS
22569 
22570   ;;
22571 esac
22572 fi
22573 DOT=$ac_cv_path_DOT
22574 if test -n "$DOT"; then
22575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22576 $as_echo "$DOT" >&6; }
22577 else
22578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22579 $as_echo "no" >&6; }
22580 fi
22581 
22582 
22583   test -n "$DOT" && break
22584 done
22585 
22586   else
22587     # The variable is set, but is it from the command line or the environment?
22588 
22589     # Try to remove the string !DOT! from our list.
22590     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22591     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22592       # If it failed, the variable was not from the command line. Ignore it,
22593       # but warn the user (except for BASH, which is always set by the calling BASH).
22594       if test "xDOT" != xBASH; then
22595         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22596 $as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22597       fi
22598       # Try to locate tool using the code snippet
22599       for ac_prog in dot
22600 do
22601   # Extract the first word of "$ac_prog", so it can be a program name with args.
22602 set dummy $ac_prog; ac_word=$2
22603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22604 $as_echo_n "checking for $ac_word... " >&6; }
22605 if ${ac_cv_path_DOT+:} false; then :
22606   $as_echo_n "(cached) " >&6
22607 else
22608   case $DOT in
22609   [\\/]* | ?:[\\/]*)
22610   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22611   ;;
22612   *)
22613   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22614 for as_dir in $PATH
22615 do
22616   IFS=$as_save_IFS
22617   test -z "$as_dir" && as_dir=.
22618     for ac_exec_ext in '' $ac_executable_extensions; do
22619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22620     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22622     break 2
22623   fi
22624 done
22625   done
22626 IFS=$as_save_IFS
22627 
22628   ;;
22629 esac
22630 fi
22631 DOT=$ac_cv_path_DOT
22632 if test -n "$DOT"; then
22633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22634 $as_echo "$DOT" >&6; }
22635 else
22636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22637 $as_echo "no" >&6; }
22638 fi
22639 
22640 
22641   test -n "$DOT" && break
22642 done
22643 
22644     else
22645       # If it succeeded, then it was overridden by the user. We will use it
22646       # for the tool.
22647 
22648       # First remove it from the list of overridden variables, so we can test
22649       # for unknown variables in the end.
22650       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22651 
22652       # Check if we try to supply an empty value
22653       if test "x$DOT" = x; then
22654         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22655 $as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22656         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22657 $as_echo_n "checking for DOT... " >&6; }
22658         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22659 $as_echo "disabled" >&6; }
22660       else
22661         # Check if the provided tool contains a complete path.
22662         tool_specified="$DOT"
22663         tool_basename="${tool_specified##*/}"
22664         if test "x$tool_basename" = "x$tool_specified"; then
22665           # A command without a complete path is provided, search $PATH.
22666           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22667 $as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22668           # Extract the first word of "$tool_basename", so it can be a program name with args.
22669 set dummy $tool_basename; ac_word=$2
22670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22671 $as_echo_n "checking for $ac_word... " >&6; }
22672 if ${ac_cv_path_DOT+:} false; then :
22673   $as_echo_n "(cached) " >&6
22674 else
22675   case $DOT in
22676   [\\/]* | ?:[\\/]*)
22677   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22678   ;;
22679   *)
22680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22681 for as_dir in $PATH
22682 do
22683   IFS=$as_save_IFS
22684   test -z "$as_dir" && as_dir=.
22685     for ac_exec_ext in '' $ac_executable_extensions; do
22686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22687     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22689     break 2
22690   fi
22691 done
22692   done
22693 IFS=$as_save_IFS
22694 
22695   ;;
22696 esac
22697 fi
22698 DOT=$ac_cv_path_DOT
22699 if test -n "$DOT"; then
22700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22701 $as_echo "$DOT" >&6; }
22702 else
22703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22704 $as_echo "no" >&6; }
22705 fi
22706 
22707 
22708           if test "x$DOT" = x; then
22709             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22710           fi
22711         else
22712           # Otherwise we believe it is a complete path. Use it as it is.
22713           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22714 $as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22715           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22716 $as_echo_n "checking for DOT... " >&6; }
22717           if test ! -x "$tool_specified"; then
22718             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22719 $as_echo "not found" >&6; }
22720             as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22721           fi
22722           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22723 $as_echo "$tool_specified" >&6; }
22724         fi
22725       fi
22726     fi
22727 
22728   fi
22729 
22730 
22731 
22732 
22733   # Publish this variable in the help.
22734 
22735 
22736   if [ -z "${HG+x}" ]; then
22737     # The variable is not set by user, try to locate tool using the code snippet
22738     for ac_prog in hg
22739 do
22740   # Extract the first word of "$ac_prog", so it can be a program name with args.
22741 set dummy $ac_prog; ac_word=$2
22742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22743 $as_echo_n "checking for $ac_word... " >&6; }
22744 if ${ac_cv_path_HG+:} false; then :
22745   $as_echo_n "(cached) " >&6
22746 else
22747   case $HG in
22748   [\\/]* | ?:[\\/]*)
22749   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22750   ;;
22751   *)
22752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22753 for as_dir in $PATH
22754 do
22755   IFS=$as_save_IFS
22756   test -z "$as_dir" && as_dir=.
22757     for ac_exec_ext in '' $ac_executable_extensions; do
22758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22759     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22761     break 2
22762   fi
22763 done
22764   done
22765 IFS=$as_save_IFS
22766 
22767   ;;
22768 esac
22769 fi
22770 HG=$ac_cv_path_HG
22771 if test -n "$HG"; then
22772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22773 $as_echo "$HG" >&6; }
22774 else
22775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22776 $as_echo "no" >&6; }
22777 fi
22778 
22779 
22780   test -n "$HG" && break
22781 done
22782 
22783   else
22784     # The variable is set, but is it from the command line or the environment?
22785 
22786     # Try to remove the string !HG! from our list.
22787     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22788     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22789       # If it failed, the variable was not from the command line. Ignore it,
22790       # but warn the user (except for BASH, which is always set by the calling BASH).
22791       if test "xHG" != xBASH; then
22792         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22793 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22794       fi
22795       # Try to locate tool using the code snippet
22796       for ac_prog in hg
22797 do
22798   # Extract the first word of "$ac_prog", so it can be a program name with args.
22799 set dummy $ac_prog; ac_word=$2
22800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22801 $as_echo_n "checking for $ac_word... " >&6; }
22802 if ${ac_cv_path_HG+:} false; then :
22803   $as_echo_n "(cached) " >&6
22804 else
22805   case $HG in
22806   [\\/]* | ?:[\\/]*)
22807   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22808   ;;
22809   *)
22810   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22811 for as_dir in $PATH
22812 do
22813   IFS=$as_save_IFS
22814   test -z "$as_dir" && as_dir=.
22815     for ac_exec_ext in '' $ac_executable_extensions; do
22816   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22817     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22818     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22819     break 2
22820   fi
22821 done
22822   done
22823 IFS=$as_save_IFS
22824 
22825   ;;
22826 esac
22827 fi
22828 HG=$ac_cv_path_HG
22829 if test -n "$HG"; then
22830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22831 $as_echo "$HG" >&6; }
22832 else
22833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22834 $as_echo "no" >&6; }
22835 fi
22836 
22837 
22838   test -n "$HG" && break
22839 done
22840 
22841     else
22842       # If it succeeded, then it was overridden by the user. We will use it
22843       # for the tool.
22844 
22845       # First remove it from the list of overridden variables, so we can test
22846       # for unknown variables in the end.
22847       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22848 
22849       # Check if we try to supply an empty value
22850       if test "x$HG" = x; then
22851         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22852 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22853         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22854 $as_echo_n "checking for HG... " >&6; }
22855         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22856 $as_echo "disabled" >&6; }
22857       else
22858         # Check if the provided tool contains a complete path.
22859         tool_specified="$HG"
22860         tool_basename="${tool_specified##*/}"
22861         if test "x$tool_basename" = "x$tool_specified"; then
22862           # A command without a complete path is provided, search $PATH.
22863           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22864 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22865           # Extract the first word of "$tool_basename", so it can be a program name with args.
22866 set dummy $tool_basename; ac_word=$2
22867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22868 $as_echo_n "checking for $ac_word... " >&6; }
22869 if ${ac_cv_path_HG+:} false; then :
22870   $as_echo_n "(cached) " >&6
22871 else
22872   case $HG in
22873   [\\/]* | ?:[\\/]*)
22874   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22875   ;;
22876   *)
22877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22878 for as_dir in $PATH
22879 do
22880   IFS=$as_save_IFS
22881   test -z "$as_dir" && as_dir=.
22882     for ac_exec_ext in '' $ac_executable_extensions; do
22883   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22884     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22886     break 2
22887   fi
22888 done
22889   done
22890 IFS=$as_save_IFS
22891 
22892   ;;
22893 esac
22894 fi
22895 HG=$ac_cv_path_HG
22896 if test -n "$HG"; then
22897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22898 $as_echo "$HG" >&6; }
22899 else
22900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22901 $as_echo "no" >&6; }
22902 fi
22903 
22904 
22905           if test "x$HG" = x; then
22906             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22907           fi
22908         else
22909           # Otherwise we believe it is a complete path. Use it as it is.
22910           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22911 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22912           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22913 $as_echo_n "checking for HG... " >&6; }
22914           if test ! -x "$tool_specified"; then
22915             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22916 $as_echo "not found" >&6; }
22917             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22918           fi
22919           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22920 $as_echo "$tool_specified" >&6; }
22921         fi
22922       fi
22923     fi
22924 
22925   fi
22926 
22927 
22928 
22929 
22930   # Publish this variable in the help.
22931 
22932 
22933   if [ -z "${STAT+x}" ]; then
22934     # The variable is not set by user, try to locate tool using the code snippet
22935     for ac_prog in stat
22936 do
22937   # Extract the first word of "$ac_prog", so it can be a program name with args.
22938 set dummy $ac_prog; ac_word=$2
22939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22940 $as_echo_n "checking for $ac_word... " >&6; }
22941 if ${ac_cv_path_STAT+:} false; then :
22942   $as_echo_n "(cached) " >&6
22943 else
22944   case $STAT in
22945   [\\/]* | ?:[\\/]*)
22946   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22947   ;;
22948   *)
22949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22950 for as_dir in $PATH
22951 do
22952   IFS=$as_save_IFS
22953   test -z "$as_dir" && as_dir=.
22954     for ac_exec_ext in '' $ac_executable_extensions; do
22955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22956     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22958     break 2
22959   fi
22960 done
22961   done
22962 IFS=$as_save_IFS
22963 
22964   ;;
22965 esac
22966 fi
22967 STAT=$ac_cv_path_STAT
22968 if test -n "$STAT"; then
22969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22970 $as_echo "$STAT" >&6; }
22971 else
22972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22973 $as_echo "no" >&6; }
22974 fi
22975 
22976 
22977   test -n "$STAT" && break
22978 done
22979 
22980   else
22981     # The variable is set, but is it from the command line or the environment?
22982 
22983     # Try to remove the string !STAT! from our list.
22984     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22985     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22986       # If it failed, the variable was not from the command line. Ignore it,
22987       # but warn the user (except for BASH, which is always set by the calling BASH).
22988       if test "xSTAT" != xBASH; then
22989         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22990 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22991       fi
22992       # Try to locate tool using the code snippet
22993       for ac_prog in stat
22994 do
22995   # Extract the first word of "$ac_prog", so it can be a program name with args.
22996 set dummy $ac_prog; ac_word=$2
22997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22998 $as_echo_n "checking for $ac_word... " >&6; }
22999 if ${ac_cv_path_STAT+:} false; then :
23000   $as_echo_n "(cached) " >&6
23001 else
23002   case $STAT in
23003   [\\/]* | ?:[\\/]*)
23004   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23005   ;;
23006   *)
23007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23008 for as_dir in $PATH
23009 do
23010   IFS=$as_save_IFS
23011   test -z "$as_dir" && as_dir=.
23012     for ac_exec_ext in '' $ac_executable_extensions; do
23013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23014     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23016     break 2
23017   fi
23018 done
23019   done
23020 IFS=$as_save_IFS
23021 
23022   ;;
23023 esac
23024 fi
23025 STAT=$ac_cv_path_STAT
23026 if test -n "$STAT"; then
23027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23028 $as_echo "$STAT" >&6; }
23029 else
23030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23031 $as_echo "no" >&6; }
23032 fi
23033 
23034 
23035   test -n "$STAT" && break
23036 done
23037 
23038     else
23039       # If it succeeded, then it was overridden by the user. We will use it
23040       # for the tool.
23041 
23042       # First remove it from the list of overridden variables, so we can test
23043       # for unknown variables in the end.
23044       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23045 
23046       # Check if we try to supply an empty value
23047       if test "x$STAT" = x; then
23048         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23049 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23050         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23051 $as_echo_n "checking for STAT... " >&6; }
23052         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23053 $as_echo "disabled" >&6; }
23054       else
23055         # Check if the provided tool contains a complete path.
23056         tool_specified="$STAT"
23057         tool_basename="${tool_specified##*/}"
23058         if test "x$tool_basename" = "x$tool_specified"; then
23059           # A command without a complete path is provided, search $PATH.
23060           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23061 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23062           # Extract the first word of "$tool_basename", so it can be a program name with args.
23063 set dummy $tool_basename; ac_word=$2
23064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23065 $as_echo_n "checking for $ac_word... " >&6; }
23066 if ${ac_cv_path_STAT+:} false; then :
23067   $as_echo_n "(cached) " >&6
23068 else
23069   case $STAT in
23070   [\\/]* | ?:[\\/]*)
23071   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23072   ;;
23073   *)
23074   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23075 for as_dir in $PATH
23076 do
23077   IFS=$as_save_IFS
23078   test -z "$as_dir" && as_dir=.
23079     for ac_exec_ext in '' $ac_executable_extensions; do
23080   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23081     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23083     break 2
23084   fi
23085 done
23086   done
23087 IFS=$as_save_IFS
23088 
23089   ;;
23090 esac
23091 fi
23092 STAT=$ac_cv_path_STAT
23093 if test -n "$STAT"; then
23094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23095 $as_echo "$STAT" >&6; }
23096 else
23097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23098 $as_echo "no" >&6; }
23099 fi
23100 
23101 
23102           if test "x$STAT" = x; then
23103             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23104           fi
23105         else
23106           # Otherwise we believe it is a complete path. Use it as it is.
23107           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23108 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23109           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23110 $as_echo_n "checking for STAT... " >&6; }
23111           if test ! -x "$tool_specified"; then
23112             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23113 $as_echo "not found" >&6; }
23114             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23115           fi
23116           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23117 $as_echo "$tool_specified" >&6; }
23118         fi
23119       fi
23120     fi
23121 
23122   fi
23123 
23124 
23125 
23126 
23127   # Publish this variable in the help.
23128 
23129 
23130   if [ -z "${TIME+x}" ]; then
23131     # The variable is not set by user, try to locate tool using the code snippet
23132     for ac_prog in time
23133 do
23134   # Extract the first word of "$ac_prog", so it can be a program name with args.
23135 set dummy $ac_prog; ac_word=$2
23136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23137 $as_echo_n "checking for $ac_word... " >&6; }
23138 if ${ac_cv_path_TIME+:} false; then :
23139   $as_echo_n "(cached) " >&6
23140 else
23141   case $TIME in
23142   [\\/]* | ?:[\\/]*)
23143   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23144   ;;
23145   *)
23146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23147 for as_dir in $PATH
23148 do
23149   IFS=$as_save_IFS
23150   test -z "$as_dir" && as_dir=.
23151     for ac_exec_ext in '' $ac_executable_extensions; do
23152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23153     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23155     break 2
23156   fi
23157 done
23158   done
23159 IFS=$as_save_IFS
23160 
23161   ;;
23162 esac
23163 fi
23164 TIME=$ac_cv_path_TIME
23165 if test -n "$TIME"; then
23166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23167 $as_echo "$TIME" >&6; }
23168 else
23169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23170 $as_echo "no" >&6; }
23171 fi
23172 
23173 
23174   test -n "$TIME" && break
23175 done
23176 
23177   else
23178     # The variable is set, but is it from the command line or the environment?
23179 
23180     # Try to remove the string !TIME! from our list.
23181     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23182     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23183       # If it failed, the variable was not from the command line. Ignore it,
23184       # but warn the user (except for BASH, which is always set by the calling BASH).
23185       if test "xTIME" != xBASH; then
23186         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23187 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23188       fi
23189       # Try to locate tool using the code snippet
23190       for ac_prog in time
23191 do
23192   # Extract the first word of "$ac_prog", so it can be a program name with args.
23193 set dummy $ac_prog; ac_word=$2
23194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23195 $as_echo_n "checking for $ac_word... " >&6; }
23196 if ${ac_cv_path_TIME+:} false; then :
23197   $as_echo_n "(cached) " >&6
23198 else
23199   case $TIME in
23200   [\\/]* | ?:[\\/]*)
23201   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23202   ;;
23203   *)
23204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23205 for as_dir in $PATH
23206 do
23207   IFS=$as_save_IFS
23208   test -z "$as_dir" && as_dir=.
23209     for ac_exec_ext in '' $ac_executable_extensions; do
23210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23211     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23213     break 2
23214   fi
23215 done
23216   done
23217 IFS=$as_save_IFS
23218 
23219   ;;
23220 esac
23221 fi
23222 TIME=$ac_cv_path_TIME
23223 if test -n "$TIME"; then
23224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23225 $as_echo "$TIME" >&6; }
23226 else
23227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23228 $as_echo "no" >&6; }
23229 fi
23230 
23231 
23232   test -n "$TIME" && break
23233 done
23234 
23235     else
23236       # If it succeeded, then it was overridden by the user. We will use it
23237       # for the tool.
23238 
23239       # First remove it from the list of overridden variables, so we can test
23240       # for unknown variables in the end.
23241       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23242 
23243       # Check if we try to supply an empty value
23244       if test "x$TIME" = x; then
23245         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23246 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23247         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23248 $as_echo_n "checking for TIME... " >&6; }
23249         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23250 $as_echo "disabled" >&6; }
23251       else
23252         # Check if the provided tool contains a complete path.
23253         tool_specified="$TIME"
23254         tool_basename="${tool_specified##*/}"
23255         if test "x$tool_basename" = "x$tool_specified"; then
23256           # A command without a complete path is provided, search $PATH.
23257           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23258 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23259           # Extract the first word of "$tool_basename", so it can be a program name with args.
23260 set dummy $tool_basename; ac_word=$2
23261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23262 $as_echo_n "checking for $ac_word... " >&6; }
23263 if ${ac_cv_path_TIME+:} false; then :
23264   $as_echo_n "(cached) " >&6
23265 else
23266   case $TIME in
23267   [\\/]* | ?:[\\/]*)
23268   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23269   ;;
23270   *)
23271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23272 for as_dir in $PATH
23273 do
23274   IFS=$as_save_IFS
23275   test -z "$as_dir" && as_dir=.
23276     for ac_exec_ext in '' $ac_executable_extensions; do
23277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23278     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23280     break 2
23281   fi
23282 done
23283   done
23284 IFS=$as_save_IFS
23285 
23286   ;;
23287 esac
23288 fi
23289 TIME=$ac_cv_path_TIME
23290 if test -n "$TIME"; then
23291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23292 $as_echo "$TIME" >&6; }
23293 else
23294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23295 $as_echo "no" >&6; }
23296 fi
23297 
23298 
23299           if test "x$TIME" = x; then
23300             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23301           fi
23302         else
23303           # Otherwise we believe it is a complete path. Use it as it is.
23304           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23305 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23306           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23307 $as_echo_n "checking for TIME... " >&6; }
23308           if test ! -x "$tool_specified"; then
23309             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23310 $as_echo "not found" >&6; }
23311             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23312           fi
23313           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23314 $as_echo "$tool_specified" >&6; }
23315         fi
23316       fi
23317     fi
23318 
23319   fi
23320 
23321 
23322 
23323 
23324   # Publish this variable in the help.
23325 
23326 
23327   if [ -z "${FLOCK+x}" ]; then
23328     # The variable is not set by user, try to locate tool using the code snippet
23329     for ac_prog in flock
23330 do
23331   # Extract the first word of "$ac_prog", so it can be a program name with args.
23332 set dummy $ac_prog; ac_word=$2
23333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23334 $as_echo_n "checking for $ac_word... " >&6; }
23335 if ${ac_cv_path_FLOCK+:} false; then :
23336   $as_echo_n "(cached) " >&6
23337 else
23338   case $FLOCK in
23339   [\\/]* | ?:[\\/]*)
23340   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23341   ;;
23342   *)
23343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23344 for as_dir in $PATH
23345 do
23346   IFS=$as_save_IFS
23347   test -z "$as_dir" && as_dir=.
23348     for ac_exec_ext in '' $ac_executable_extensions; do
23349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23350     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23352     break 2
23353   fi
23354 done
23355   done
23356 IFS=$as_save_IFS
23357 
23358   ;;
23359 esac
23360 fi
23361 FLOCK=$ac_cv_path_FLOCK
23362 if test -n "$FLOCK"; then
23363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23364 $as_echo "$FLOCK" >&6; }
23365 else
23366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23367 $as_echo "no" >&6; }
23368 fi
23369 
23370 
23371   test -n "$FLOCK" && break
23372 done
23373 
23374   else
23375     # The variable is set, but is it from the command line or the environment?
23376 
23377     # Try to remove the string !FLOCK! from our list.
23378     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23379     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23380       # If it failed, the variable was not from the command line. Ignore it,
23381       # but warn the user (except for BASH, which is always set by the calling BASH).
23382       if test "xFLOCK" != xBASH; then
23383         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23384 $as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23385       fi
23386       # Try to locate tool using the code snippet
23387       for ac_prog in flock
23388 do
23389   # Extract the first word of "$ac_prog", so it can be a program name with args.
23390 set dummy $ac_prog; ac_word=$2
23391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23392 $as_echo_n "checking for $ac_word... " >&6; }
23393 if ${ac_cv_path_FLOCK+:} false; then :
23394   $as_echo_n "(cached) " >&6
23395 else
23396   case $FLOCK in
23397   [\\/]* | ?:[\\/]*)
23398   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23399   ;;
23400   *)
23401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23402 for as_dir in $PATH
23403 do
23404   IFS=$as_save_IFS
23405   test -z "$as_dir" && as_dir=.
23406     for ac_exec_ext in '' $ac_executable_extensions; do
23407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23408     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23410     break 2
23411   fi
23412 done
23413   done
23414 IFS=$as_save_IFS
23415 
23416   ;;
23417 esac
23418 fi
23419 FLOCK=$ac_cv_path_FLOCK
23420 if test -n "$FLOCK"; then
23421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23422 $as_echo "$FLOCK" >&6; }
23423 else
23424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23425 $as_echo "no" >&6; }
23426 fi
23427 
23428 
23429   test -n "$FLOCK" && break
23430 done
23431 
23432     else
23433       # If it succeeded, then it was overridden by the user. We will use it
23434       # for the tool.
23435 
23436       # First remove it from the list of overridden variables, so we can test
23437       # for unknown variables in the end.
23438       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23439 
23440       # Check if we try to supply an empty value
23441       if test "x$FLOCK" = x; then
23442         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23443 $as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23444         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23445 $as_echo_n "checking for FLOCK... " >&6; }
23446         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23447 $as_echo "disabled" >&6; }
23448       else
23449         # Check if the provided tool contains a complete path.
23450         tool_specified="$FLOCK"
23451         tool_basename="${tool_specified##*/}"
23452         if test "x$tool_basename" = "x$tool_specified"; then
23453           # A command without a complete path is provided, search $PATH.
23454           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23455 $as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23456           # Extract the first word of "$tool_basename", so it can be a program name with args.
23457 set dummy $tool_basename; ac_word=$2
23458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23459 $as_echo_n "checking for $ac_word... " >&6; }
23460 if ${ac_cv_path_FLOCK+:} false; then :
23461   $as_echo_n "(cached) " >&6
23462 else
23463   case $FLOCK in
23464   [\\/]* | ?:[\\/]*)
23465   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23466   ;;
23467   *)
23468   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23469 for as_dir in $PATH
23470 do
23471   IFS=$as_save_IFS
23472   test -z "$as_dir" && as_dir=.
23473     for ac_exec_ext in '' $ac_executable_extensions; do
23474   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23475     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23476     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23477     break 2
23478   fi
23479 done
23480   done
23481 IFS=$as_save_IFS
23482 
23483   ;;
23484 esac
23485 fi
23486 FLOCK=$ac_cv_path_FLOCK
23487 if test -n "$FLOCK"; then
23488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23489 $as_echo "$FLOCK" >&6; }
23490 else
23491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23492 $as_echo "no" >&6; }
23493 fi
23494 
23495 
23496           if test "x$FLOCK" = x; then
23497             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23498           fi
23499         else
23500           # Otherwise we believe it is a complete path. Use it as it is.
23501           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23502 $as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23503           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23504 $as_echo_n "checking for FLOCK... " >&6; }
23505           if test ! -x "$tool_specified"; then
23506             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23507 $as_echo "not found" >&6; }
23508             as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23509           fi
23510           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23511 $as_echo "$tool_specified" >&6; }
23512         fi
23513       fi
23514     fi
23515 
23516   fi
23517 
23518 
23519   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23520   # be in the user path.
23521 
23522 
23523   # Publish this variable in the help.
23524 
23525 
23526   if [ -z "${DTRACE+x}" ]; then
23527     # The variable is not set by user, try to locate tool using the code snippet
23528     for ac_prog in dtrace
23529 do
23530   # Extract the first word of "$ac_prog", so it can be a program name with args.
23531 set dummy $ac_prog; ac_word=$2
23532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23533 $as_echo_n "checking for $ac_word... " >&6; }
23534 if ${ac_cv_path_DTRACE+:} false; then :
23535   $as_echo_n "(cached) " >&6
23536 else
23537   case $DTRACE in
23538   [\\/]* | ?:[\\/]*)
23539   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23540   ;;
23541   *)
23542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23543 as_dummy="$PATH:/usr/sbin"
23544 for as_dir in $as_dummy
23545 do
23546   IFS=$as_save_IFS
23547   test -z "$as_dir" && as_dir=.
23548     for ac_exec_ext in '' $ac_executable_extensions; do
23549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23550     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23552     break 2
23553   fi
23554 done
23555   done
23556 IFS=$as_save_IFS
23557 
23558   ;;
23559 esac
23560 fi
23561 DTRACE=$ac_cv_path_DTRACE
23562 if test -n "$DTRACE"; then
23563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23564 $as_echo "$DTRACE" >&6; }
23565 else
23566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23567 $as_echo "no" >&6; }
23568 fi
23569 
23570 
23571   test -n "$DTRACE" && break
23572 done
23573 
23574   else
23575     # The variable is set, but is it from the command line or the environment?
23576 
23577     # Try to remove the string !DTRACE! from our list.
23578     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23579     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23580       # If it failed, the variable was not from the command line. Ignore it,
23581       # but warn the user (except for BASH, which is always set by the calling BASH).
23582       if test "xDTRACE" != xBASH; then
23583         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23584 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23585       fi
23586       # Try to locate tool using the code snippet
23587       for ac_prog in dtrace
23588 do
23589   # Extract the first word of "$ac_prog", so it can be a program name with args.
23590 set dummy $ac_prog; ac_word=$2
23591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23592 $as_echo_n "checking for $ac_word... " >&6; }
23593 if ${ac_cv_path_DTRACE+:} false; then :
23594   $as_echo_n "(cached) " >&6
23595 else
23596   case $DTRACE in
23597   [\\/]* | ?:[\\/]*)
23598   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23599   ;;
23600   *)
23601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23602 as_dummy="$PATH:/usr/sbin"
23603 for as_dir in $as_dummy
23604 do
23605   IFS=$as_save_IFS
23606   test -z "$as_dir" && as_dir=.
23607     for ac_exec_ext in '' $ac_executable_extensions; do
23608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23609     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23611     break 2
23612   fi
23613 done
23614   done
23615 IFS=$as_save_IFS
23616 
23617   ;;
23618 esac
23619 fi
23620 DTRACE=$ac_cv_path_DTRACE
23621 if test -n "$DTRACE"; then
23622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23623 $as_echo "$DTRACE" >&6; }
23624 else
23625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23626 $as_echo "no" >&6; }
23627 fi
23628 
23629 
23630   test -n "$DTRACE" && break
23631 done
23632 
23633     else
23634       # If it succeeded, then it was overridden by the user. We will use it
23635       # for the tool.
23636 
23637       # First remove it from the list of overridden variables, so we can test
23638       # for unknown variables in the end.
23639       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23640 
23641       # Check if we try to supply an empty value
23642       if test "x$DTRACE" = x; then
23643         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23644 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23645         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23646 $as_echo_n "checking for DTRACE... " >&6; }
23647         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23648 $as_echo "disabled" >&6; }
23649       else
23650         # Check if the provided tool contains a complete path.
23651         tool_specified="$DTRACE"
23652         tool_basename="${tool_specified##*/}"
23653         if test "x$tool_basename" = "x$tool_specified"; then
23654           # A command without a complete path is provided, search $PATH.
23655           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23656 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23657           # Extract the first word of "$tool_basename", so it can be a program name with args.
23658 set dummy $tool_basename; ac_word=$2
23659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23660 $as_echo_n "checking for $ac_word... " >&6; }
23661 if ${ac_cv_path_DTRACE+:} false; then :
23662   $as_echo_n "(cached) " >&6
23663 else
23664   case $DTRACE in
23665   [\\/]* | ?:[\\/]*)
23666   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23667   ;;
23668   *)
23669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23670 for as_dir in $PATH
23671 do
23672   IFS=$as_save_IFS
23673   test -z "$as_dir" && as_dir=.
23674     for ac_exec_ext in '' $ac_executable_extensions; do
23675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23676     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23678     break 2
23679   fi
23680 done
23681   done
23682 IFS=$as_save_IFS
23683 
23684   ;;
23685 esac
23686 fi
23687 DTRACE=$ac_cv_path_DTRACE
23688 if test -n "$DTRACE"; then
23689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23690 $as_echo "$DTRACE" >&6; }
23691 else
23692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23693 $as_echo "no" >&6; }
23694 fi
23695 
23696 
23697           if test "x$DTRACE" = x; then
23698             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23699           fi
23700         else
23701           # Otherwise we believe it is a complete path. Use it as it is.
23702           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23703 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23704           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23705 $as_echo_n "checking for DTRACE... " >&6; }
23706           if test ! -x "$tool_specified"; then
23707             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23708 $as_echo "not found" >&6; }
23709             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23710           fi
23711           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23712 $as_echo "$tool_specified" >&6; }
23713         fi
23714       fi
23715     fi
23716 
23717   fi
23718 
23719 
23720 
23721 
23722   # Publish this variable in the help.
23723 
23724 
23725   if [ -z "${PATCH+x}" ]; then
23726     # The variable is not set by user, try to locate tool using the code snippet
23727     for ac_prog in gpatch patch
23728 do
23729   # Extract the first word of "$ac_prog", so it can be a program name with args.
23730 set dummy $ac_prog; ac_word=$2
23731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23732 $as_echo_n "checking for $ac_word... " >&6; }
23733 if ${ac_cv_path_PATCH+:} false; then :
23734   $as_echo_n "(cached) " >&6
23735 else
23736   case $PATCH in
23737   [\\/]* | ?:[\\/]*)
23738   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23739   ;;
23740   *)
23741   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23742 for as_dir in $PATH
23743 do
23744   IFS=$as_save_IFS
23745   test -z "$as_dir" && as_dir=.
23746     for ac_exec_ext in '' $ac_executable_extensions; do
23747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23748     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23750     break 2
23751   fi
23752 done
23753   done
23754 IFS=$as_save_IFS
23755 
23756   ;;
23757 esac
23758 fi
23759 PATCH=$ac_cv_path_PATCH
23760 if test -n "$PATCH"; then
23761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23762 $as_echo "$PATCH" >&6; }
23763 else
23764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23765 $as_echo "no" >&6; }
23766 fi
23767 
23768 
23769   test -n "$PATCH" && break
23770 done
23771 
23772   else
23773     # The variable is set, but is it from the command line or the environment?
23774 
23775     # Try to remove the string !PATCH! from our list.
23776     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23777     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23778       # If it failed, the variable was not from the command line. Ignore it,
23779       # but warn the user (except for BASH, which is always set by the calling BASH).
23780       if test "xPATCH" != xBASH; then
23781         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23782 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23783       fi
23784       # Try to locate tool using the code snippet
23785       for ac_prog in gpatch patch
23786 do
23787   # Extract the first word of "$ac_prog", so it can be a program name with args.
23788 set dummy $ac_prog; ac_word=$2
23789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23790 $as_echo_n "checking for $ac_word... " >&6; }
23791 if ${ac_cv_path_PATCH+:} false; then :
23792   $as_echo_n "(cached) " >&6
23793 else
23794   case $PATCH in
23795   [\\/]* | ?:[\\/]*)
23796   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23797   ;;
23798   *)
23799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23800 for as_dir in $PATH
23801 do
23802   IFS=$as_save_IFS
23803   test -z "$as_dir" && as_dir=.
23804     for ac_exec_ext in '' $ac_executable_extensions; do
23805   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23806     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23808     break 2
23809   fi
23810 done
23811   done
23812 IFS=$as_save_IFS
23813 
23814   ;;
23815 esac
23816 fi
23817 PATCH=$ac_cv_path_PATCH
23818 if test -n "$PATCH"; then
23819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23820 $as_echo "$PATCH" >&6; }
23821 else
23822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23823 $as_echo "no" >&6; }
23824 fi
23825 
23826 
23827   test -n "$PATCH" && break
23828 done
23829 
23830     else
23831       # If it succeeded, then it was overridden by the user. We will use it
23832       # for the tool.
23833 
23834       # First remove it from the list of overridden variables, so we can test
23835       # for unknown variables in the end.
23836       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23837 
23838       # Check if we try to supply an empty value
23839       if test "x$PATCH" = x; then
23840         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23841 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23842         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23843 $as_echo_n "checking for PATCH... " >&6; }
23844         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23845 $as_echo "disabled" >&6; }
23846       else
23847         # Check if the provided tool contains a complete path.
23848         tool_specified="$PATCH"
23849         tool_basename="${tool_specified##*/}"
23850         if test "x$tool_basename" = "x$tool_specified"; then
23851           # A command without a complete path is provided, search $PATH.
23852           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23853 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23854           # Extract the first word of "$tool_basename", so it can be a program name with args.
23855 set dummy $tool_basename; ac_word=$2
23856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23857 $as_echo_n "checking for $ac_word... " >&6; }
23858 if ${ac_cv_path_PATCH+:} false; then :
23859   $as_echo_n "(cached) " >&6
23860 else
23861   case $PATCH in
23862   [\\/]* | ?:[\\/]*)
23863   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23864   ;;
23865   *)
23866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23867 for as_dir in $PATH
23868 do
23869   IFS=$as_save_IFS
23870   test -z "$as_dir" && as_dir=.
23871     for ac_exec_ext in '' $ac_executable_extensions; do
23872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23873     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23875     break 2
23876   fi
23877 done
23878   done
23879 IFS=$as_save_IFS
23880 
23881   ;;
23882 esac
23883 fi
23884 PATCH=$ac_cv_path_PATCH
23885 if test -n "$PATCH"; then
23886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23887 $as_echo "$PATCH" >&6; }
23888 else
23889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23890 $as_echo "no" >&6; }
23891 fi
23892 
23893 
23894           if test "x$PATCH" = x; then
23895             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23896           fi
23897         else
23898           # Otherwise we believe it is a complete path. Use it as it is.
23899           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23900 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23901           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23902 $as_echo_n "checking for PATCH... " >&6; }
23903           if test ! -x "$tool_specified"; then
23904             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23905 $as_echo "not found" >&6; }
23906             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23907           fi
23908           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23909 $as_echo "$tool_specified" >&6; }
23910         fi
23911       fi
23912     fi
23913 
23914   fi
23915 
23916 
23917   # Check if it's GNU time
23918   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23919   if test "x$IS_GNU_TIME" != x; then
23920     IS_GNU_TIME=yes
23921   else
23922     IS_GNU_TIME=no
23923   fi
23924 
23925 
23926   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23927 
23928 
23929 
23930   # Publish this variable in the help.
23931 
23932 
23933   if [ -z "${DSYMUTIL+x}" ]; then
23934     # The variable is not set by user, try to locate tool using the code snippet
23935     for ac_prog in dsymutil
23936 do
23937   # Extract the first word of "$ac_prog", so it can be a program name with args.
23938 set dummy $ac_prog; ac_word=$2
23939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23940 $as_echo_n "checking for $ac_word... " >&6; }
23941 if ${ac_cv_path_DSYMUTIL+:} false; then :
23942   $as_echo_n "(cached) " >&6
23943 else
23944   case $DSYMUTIL in
23945   [\\/]* | ?:[\\/]*)
23946   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23947   ;;
23948   *)
23949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23950 for as_dir in $PATH
23951 do
23952   IFS=$as_save_IFS
23953   test -z "$as_dir" && as_dir=.
23954     for ac_exec_ext in '' $ac_executable_extensions; do
23955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23956     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23958     break 2
23959   fi
23960 done
23961   done
23962 IFS=$as_save_IFS
23963 
23964   ;;
23965 esac
23966 fi
23967 DSYMUTIL=$ac_cv_path_DSYMUTIL
23968 if test -n "$DSYMUTIL"; then
23969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23970 $as_echo "$DSYMUTIL" >&6; }
23971 else
23972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23973 $as_echo "no" >&6; }
23974 fi
23975 
23976 
23977   test -n "$DSYMUTIL" && break
23978 done
23979 
23980   else
23981     # The variable is set, but is it from the command line or the environment?
23982 
23983     # Try to remove the string !DSYMUTIL! from our list.
23984     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23985     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23986       # If it failed, the variable was not from the command line. Ignore it,
23987       # but warn the user (except for BASH, which is always set by the calling BASH).
23988       if test "xDSYMUTIL" != xBASH; then
23989         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23990 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23991       fi
23992       # Try to locate tool using the code snippet
23993       for ac_prog in dsymutil
23994 do
23995   # Extract the first word of "$ac_prog", so it can be a program name with args.
23996 set dummy $ac_prog; ac_word=$2
23997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23998 $as_echo_n "checking for $ac_word... " >&6; }
23999 if ${ac_cv_path_DSYMUTIL+:} false; then :
24000   $as_echo_n "(cached) " >&6
24001 else
24002   case $DSYMUTIL in
24003   [\\/]* | ?:[\\/]*)
24004   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24005   ;;
24006   *)
24007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24008 for as_dir in $PATH
24009 do
24010   IFS=$as_save_IFS
24011   test -z "$as_dir" && as_dir=.
24012     for ac_exec_ext in '' $ac_executable_extensions; do
24013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24014     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24016     break 2
24017   fi
24018 done
24019   done
24020 IFS=$as_save_IFS
24021 
24022   ;;
24023 esac
24024 fi
24025 DSYMUTIL=$ac_cv_path_DSYMUTIL
24026 if test -n "$DSYMUTIL"; then
24027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24028 $as_echo "$DSYMUTIL" >&6; }
24029 else
24030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24031 $as_echo "no" >&6; }
24032 fi
24033 
24034 
24035   test -n "$DSYMUTIL" && break
24036 done
24037 
24038     else
24039       # If it succeeded, then it was overridden by the user. We will use it
24040       # for the tool.
24041 
24042       # First remove it from the list of overridden variables, so we can test
24043       # for unknown variables in the end.
24044       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24045 
24046       # Check if we try to supply an empty value
24047       if test "x$DSYMUTIL" = x; then
24048         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
24049 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
24050         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24051 $as_echo_n "checking for DSYMUTIL... " >&6; }
24052         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24053 $as_echo "disabled" >&6; }
24054       else
24055         # Check if the provided tool contains a complete path.
24056         tool_specified="$DSYMUTIL"
24057         tool_basename="${tool_specified##*/}"
24058         if test "x$tool_basename" = "x$tool_specified"; then
24059           # A command without a complete path is provided, search $PATH.
24060           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
24061 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
24062           # Extract the first word of "$tool_basename", so it can be a program name with args.
24063 set dummy $tool_basename; ac_word=$2
24064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24065 $as_echo_n "checking for $ac_word... " >&6; }
24066 if ${ac_cv_path_DSYMUTIL+:} false; then :
24067   $as_echo_n "(cached) " >&6
24068 else
24069   case $DSYMUTIL in
24070   [\\/]* | ?:[\\/]*)
24071   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24072   ;;
24073   *)
24074   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24075 for as_dir in $PATH
24076 do
24077   IFS=$as_save_IFS
24078   test -z "$as_dir" && as_dir=.
24079     for ac_exec_ext in '' $ac_executable_extensions; do
24080   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24081     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24083     break 2
24084   fi
24085 done
24086   done
24087 IFS=$as_save_IFS
24088 
24089   ;;
24090 esac
24091 fi
24092 DSYMUTIL=$ac_cv_path_DSYMUTIL
24093 if test -n "$DSYMUTIL"; then
24094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24095 $as_echo "$DSYMUTIL" >&6; }
24096 else
24097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24098 $as_echo "no" >&6; }
24099 fi
24100 
24101 
24102           if test "x$DSYMUTIL" = x; then
24103             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24104           fi
24105         else
24106           # Otherwise we believe it is a complete path. Use it as it is.
24107           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24108 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24109           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24110 $as_echo_n "checking for DSYMUTIL... " >&6; }
24111           if test ! -x "$tool_specified"; then
24112             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24113 $as_echo "not found" >&6; }
24114             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24115           fi
24116           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24117 $as_echo "$tool_specified" >&6; }
24118         fi
24119       fi
24120     fi
24121 
24122   fi
24123 
24124 
24125 
24126   if test "x$DSYMUTIL" = x; then
24127     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24128   fi
24129 
24130 
24131 
24132 
24133 
24134   # Publish this variable in the help.
24135 
24136 
24137   if [ -z "${XATTR+x}" ]; then
24138     # The variable is not set by user, try to locate tool using the code snippet
24139     for ac_prog in xattr
24140 do
24141   # Extract the first word of "$ac_prog", so it can be a program name with args.
24142 set dummy $ac_prog; ac_word=$2
24143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24144 $as_echo_n "checking for $ac_word... " >&6; }
24145 if ${ac_cv_path_XATTR+:} false; then :
24146   $as_echo_n "(cached) " >&6
24147 else
24148   case $XATTR in
24149   [\\/]* | ?:[\\/]*)
24150   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24151   ;;
24152   *)
24153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24154 for as_dir in $PATH
24155 do
24156   IFS=$as_save_IFS
24157   test -z "$as_dir" && as_dir=.
24158     for ac_exec_ext in '' $ac_executable_extensions; do
24159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24160     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24162     break 2
24163   fi
24164 done
24165   done
24166 IFS=$as_save_IFS
24167 
24168   ;;
24169 esac
24170 fi
24171 XATTR=$ac_cv_path_XATTR
24172 if test -n "$XATTR"; then
24173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24174 $as_echo "$XATTR" >&6; }
24175 else
24176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24177 $as_echo "no" >&6; }
24178 fi
24179 
24180 
24181   test -n "$XATTR" && break
24182 done
24183 
24184   else
24185     # The variable is set, but is it from the command line or the environment?
24186 
24187     # Try to remove the string !XATTR! from our list.
24188     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24189     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24190       # If it failed, the variable was not from the command line. Ignore it,
24191       # but warn the user (except for BASH, which is always set by the calling BASH).
24192       if test "xXATTR" != xBASH; then
24193         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24194 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24195       fi
24196       # Try to locate tool using the code snippet
24197       for ac_prog in xattr
24198 do
24199   # Extract the first word of "$ac_prog", so it can be a program name with args.
24200 set dummy $ac_prog; ac_word=$2
24201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24202 $as_echo_n "checking for $ac_word... " >&6; }
24203 if ${ac_cv_path_XATTR+:} false; then :
24204   $as_echo_n "(cached) " >&6
24205 else
24206   case $XATTR in
24207   [\\/]* | ?:[\\/]*)
24208   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24209   ;;
24210   *)
24211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24212 for as_dir in $PATH
24213 do
24214   IFS=$as_save_IFS
24215   test -z "$as_dir" && as_dir=.
24216     for ac_exec_ext in '' $ac_executable_extensions; do
24217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24218     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24220     break 2
24221   fi
24222 done
24223   done
24224 IFS=$as_save_IFS
24225 
24226   ;;
24227 esac
24228 fi
24229 XATTR=$ac_cv_path_XATTR
24230 if test -n "$XATTR"; then
24231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24232 $as_echo "$XATTR" >&6; }
24233 else
24234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24235 $as_echo "no" >&6; }
24236 fi
24237 
24238 
24239   test -n "$XATTR" && break
24240 done
24241 
24242     else
24243       # If it succeeded, then it was overridden by the user. We will use it
24244       # for the tool.
24245 
24246       # First remove it from the list of overridden variables, so we can test
24247       # for unknown variables in the end.
24248       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24249 
24250       # Check if we try to supply an empty value
24251       if test "x$XATTR" = x; then
24252         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24253 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24254         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24255 $as_echo_n "checking for XATTR... " >&6; }
24256         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24257 $as_echo "disabled" >&6; }
24258       else
24259         # Check if the provided tool contains a complete path.
24260         tool_specified="$XATTR"
24261         tool_basename="${tool_specified##*/}"
24262         if test "x$tool_basename" = "x$tool_specified"; then
24263           # A command without a complete path is provided, search $PATH.
24264           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24265 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24266           # Extract the first word of "$tool_basename", so it can be a program name with args.
24267 set dummy $tool_basename; ac_word=$2
24268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24269 $as_echo_n "checking for $ac_word... " >&6; }
24270 if ${ac_cv_path_XATTR+:} false; then :
24271   $as_echo_n "(cached) " >&6
24272 else
24273   case $XATTR in
24274   [\\/]* | ?:[\\/]*)
24275   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24276   ;;
24277   *)
24278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24279 for as_dir in $PATH
24280 do
24281   IFS=$as_save_IFS
24282   test -z "$as_dir" && as_dir=.
24283     for ac_exec_ext in '' $ac_executable_extensions; do
24284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24285     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24287     break 2
24288   fi
24289 done
24290   done
24291 IFS=$as_save_IFS
24292 
24293   ;;
24294 esac
24295 fi
24296 XATTR=$ac_cv_path_XATTR
24297 if test -n "$XATTR"; then
24298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24299 $as_echo "$XATTR" >&6; }
24300 else
24301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24302 $as_echo "no" >&6; }
24303 fi
24304 
24305 
24306           if test "x$XATTR" = x; then
24307             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24308           fi
24309         else
24310           # Otherwise we believe it is a complete path. Use it as it is.
24311           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24312 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24313           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24314 $as_echo_n "checking for XATTR... " >&6; }
24315           if test ! -x "$tool_specified"; then
24316             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24317 $as_echo "not found" >&6; }
24318             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24319           fi
24320           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24321 $as_echo "$tool_specified" >&6; }
24322         fi
24323       fi
24324     fi
24325 
24326   fi
24327 
24328 
24329 
24330   if test "x$XATTR" = x; then
24331     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24332   fi
24333 
24334 
24335 
24336 
24337   # Publish this variable in the help.
24338 
24339 
24340   if [ -z "${CODESIGN+x}" ]; then
24341     # The variable is not set by user, try to locate tool using the code snippet
24342     for ac_prog in codesign
24343 do
24344   # Extract the first word of "$ac_prog", so it can be a program name with args.
24345 set dummy $ac_prog; ac_word=$2
24346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24347 $as_echo_n "checking for $ac_word... " >&6; }
24348 if ${ac_cv_path_CODESIGN+:} false; then :
24349   $as_echo_n "(cached) " >&6
24350 else
24351   case $CODESIGN in
24352   [\\/]* | ?:[\\/]*)
24353   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24354   ;;
24355   *)
24356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24357 for as_dir in $PATH
24358 do
24359   IFS=$as_save_IFS
24360   test -z "$as_dir" && as_dir=.
24361     for ac_exec_ext in '' $ac_executable_extensions; do
24362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24363     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24365     break 2
24366   fi
24367 done
24368   done
24369 IFS=$as_save_IFS
24370 
24371   ;;
24372 esac
24373 fi
24374 CODESIGN=$ac_cv_path_CODESIGN
24375 if test -n "$CODESIGN"; then
24376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24377 $as_echo "$CODESIGN" >&6; }
24378 else
24379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24380 $as_echo "no" >&6; }
24381 fi
24382 
24383 
24384   test -n "$CODESIGN" && break
24385 done
24386 
24387   else
24388     # The variable is set, but is it from the command line or the environment?
24389 
24390     # Try to remove the string !CODESIGN! from our list.
24391     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24392     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24393       # If it failed, the variable was not from the command line. Ignore it,
24394       # but warn the user (except for BASH, which is always set by the calling BASH).
24395       if test "xCODESIGN" != xBASH; then
24396         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24397 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24398       fi
24399       # Try to locate tool using the code snippet
24400       for ac_prog in codesign
24401 do
24402   # Extract the first word of "$ac_prog", so it can be a program name with args.
24403 set dummy $ac_prog; ac_word=$2
24404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24405 $as_echo_n "checking for $ac_word... " >&6; }
24406 if ${ac_cv_path_CODESIGN+:} false; then :
24407   $as_echo_n "(cached) " >&6
24408 else
24409   case $CODESIGN in
24410   [\\/]* | ?:[\\/]*)
24411   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24412   ;;
24413   *)
24414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24415 for as_dir in $PATH
24416 do
24417   IFS=$as_save_IFS
24418   test -z "$as_dir" && as_dir=.
24419     for ac_exec_ext in '' $ac_executable_extensions; do
24420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24421     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24423     break 2
24424   fi
24425 done
24426   done
24427 IFS=$as_save_IFS
24428 
24429   ;;
24430 esac
24431 fi
24432 CODESIGN=$ac_cv_path_CODESIGN
24433 if test -n "$CODESIGN"; then
24434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24435 $as_echo "$CODESIGN" >&6; }
24436 else
24437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24438 $as_echo "no" >&6; }
24439 fi
24440 
24441 
24442   test -n "$CODESIGN" && break
24443 done
24444 
24445     else
24446       # If it succeeded, then it was overridden by the user. We will use it
24447       # for the tool.
24448 
24449       # First remove it from the list of overridden variables, so we can test
24450       # for unknown variables in the end.
24451       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24452 
24453       # Check if we try to supply an empty value
24454       if test "x$CODESIGN" = x; then
24455         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24456 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24457         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24458 $as_echo_n "checking for CODESIGN... " >&6; }
24459         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24460 $as_echo "disabled" >&6; }
24461       else
24462         # Check if the provided tool contains a complete path.
24463         tool_specified="$CODESIGN"
24464         tool_basename="${tool_specified##*/}"
24465         if test "x$tool_basename" = "x$tool_specified"; then
24466           # A command without a complete path is provided, search $PATH.
24467           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24468 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24469           # Extract the first word of "$tool_basename", so it can be a program name with args.
24470 set dummy $tool_basename; ac_word=$2
24471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24472 $as_echo_n "checking for $ac_word... " >&6; }
24473 if ${ac_cv_path_CODESIGN+:} false; then :
24474   $as_echo_n "(cached) " >&6
24475 else
24476   case $CODESIGN in
24477   [\\/]* | ?:[\\/]*)
24478   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24479   ;;
24480   *)
24481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24482 for as_dir in $PATH
24483 do
24484   IFS=$as_save_IFS
24485   test -z "$as_dir" && as_dir=.
24486     for ac_exec_ext in '' $ac_executable_extensions; do
24487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24488     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24490     break 2
24491   fi
24492 done
24493   done
24494 IFS=$as_save_IFS
24495 
24496   ;;
24497 esac
24498 fi
24499 CODESIGN=$ac_cv_path_CODESIGN
24500 if test -n "$CODESIGN"; then
24501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24502 $as_echo "$CODESIGN" >&6; }
24503 else
24504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24505 $as_echo "no" >&6; }
24506 fi
24507 
24508 
24509           if test "x$CODESIGN" = x; then
24510             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24511           fi
24512         else
24513           # Otherwise we believe it is a complete path. Use it as it is.
24514           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24515 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24516           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24517 $as_echo_n "checking for CODESIGN... " >&6; }
24518           if test ! -x "$tool_specified"; then
24519             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24520 $as_echo "not found" >&6; }
24521             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24522           fi
24523           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24524 $as_echo "$tool_specified" >&6; }
24525         fi
24526       fi
24527     fi
24528 
24529   fi
24530 
24531 
24532     if test "x$CODESIGN" != "x"; then
24533       # Verify that the openjdk_codesign certificate is present
24534       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24535 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24536       $RM codesign-testfile
24537       $TOUCH codesign-testfile
24538       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24539       $RM codesign-testfile
24540       if test "x$CODESIGN" = x; then
24541         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24542 $as_echo "no" >&6; }
24543       else
24544         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24545 $as_echo "yes" >&6; }
24546       fi
24547     fi
24548 
24549 
24550 
24551   # Publish this variable in the help.
24552 
24553 
24554   if [ -z "${SETFILE+x}" ]; then
24555     # The variable is not set by user, try to locate tool using the code snippet
24556     for ac_prog in SetFile
24557 do
24558   # Extract the first word of "$ac_prog", so it can be a program name with args.
24559 set dummy $ac_prog; ac_word=$2
24560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24561 $as_echo_n "checking for $ac_word... " >&6; }
24562 if ${ac_cv_path_SETFILE+:} false; then :
24563   $as_echo_n "(cached) " >&6
24564 else
24565   case $SETFILE in
24566   [\\/]* | ?:[\\/]*)
24567   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24568   ;;
24569   *)
24570   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24571 for as_dir in $PATH
24572 do
24573   IFS=$as_save_IFS
24574   test -z "$as_dir" && as_dir=.
24575     for ac_exec_ext in '' $ac_executable_extensions; do
24576   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24577     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24578     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24579     break 2
24580   fi
24581 done
24582   done
24583 IFS=$as_save_IFS
24584 
24585   ;;
24586 esac
24587 fi
24588 SETFILE=$ac_cv_path_SETFILE
24589 if test -n "$SETFILE"; then
24590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24591 $as_echo "$SETFILE" >&6; }
24592 else
24593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24594 $as_echo "no" >&6; }
24595 fi
24596 
24597 
24598   test -n "$SETFILE" && break
24599 done
24600 
24601   else
24602     # The variable is set, but is it from the command line or the environment?
24603 
24604     # Try to remove the string !SETFILE! from our list.
24605     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24606     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24607       # If it failed, the variable was not from the command line. Ignore it,
24608       # but warn the user (except for BASH, which is always set by the calling BASH).
24609       if test "xSETFILE" != xBASH; then
24610         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24611 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24612       fi
24613       # Try to locate tool using the code snippet
24614       for ac_prog in SetFile
24615 do
24616   # Extract the first word of "$ac_prog", so it can be a program name with args.
24617 set dummy $ac_prog; ac_word=$2
24618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24619 $as_echo_n "checking for $ac_word... " >&6; }
24620 if ${ac_cv_path_SETFILE+:} false; then :
24621   $as_echo_n "(cached) " >&6
24622 else
24623   case $SETFILE in
24624   [\\/]* | ?:[\\/]*)
24625   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24626   ;;
24627   *)
24628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24629 for as_dir in $PATH
24630 do
24631   IFS=$as_save_IFS
24632   test -z "$as_dir" && as_dir=.
24633     for ac_exec_ext in '' $ac_executable_extensions; do
24634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24635     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24637     break 2
24638   fi
24639 done
24640   done
24641 IFS=$as_save_IFS
24642 
24643   ;;
24644 esac
24645 fi
24646 SETFILE=$ac_cv_path_SETFILE
24647 if test -n "$SETFILE"; then
24648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24649 $as_echo "$SETFILE" >&6; }
24650 else
24651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24652 $as_echo "no" >&6; }
24653 fi
24654 
24655 
24656   test -n "$SETFILE" && break
24657 done
24658 
24659     else
24660       # If it succeeded, then it was overridden by the user. We will use it
24661       # for the tool.
24662 
24663       # First remove it from the list of overridden variables, so we can test
24664       # for unknown variables in the end.
24665       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24666 
24667       # Check if we try to supply an empty value
24668       if test "x$SETFILE" = x; then
24669         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24670 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24671         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24672 $as_echo_n "checking for SETFILE... " >&6; }
24673         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24674 $as_echo "disabled" >&6; }
24675       else
24676         # Check if the provided tool contains a complete path.
24677         tool_specified="$SETFILE"
24678         tool_basename="${tool_specified##*/}"
24679         if test "x$tool_basename" = "x$tool_specified"; then
24680           # A command without a complete path is provided, search $PATH.
24681           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24682 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24683           # Extract the first word of "$tool_basename", so it can be a program name with args.
24684 set dummy $tool_basename; ac_word=$2
24685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24686 $as_echo_n "checking for $ac_word... " >&6; }
24687 if ${ac_cv_path_SETFILE+:} false; then :
24688   $as_echo_n "(cached) " >&6
24689 else
24690   case $SETFILE in
24691   [\\/]* | ?:[\\/]*)
24692   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24693   ;;
24694   *)
24695   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24696 for as_dir in $PATH
24697 do
24698   IFS=$as_save_IFS
24699   test -z "$as_dir" && as_dir=.
24700     for ac_exec_ext in '' $ac_executable_extensions; do
24701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24702     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24704     break 2
24705   fi
24706 done
24707   done
24708 IFS=$as_save_IFS
24709 
24710   ;;
24711 esac
24712 fi
24713 SETFILE=$ac_cv_path_SETFILE
24714 if test -n "$SETFILE"; then
24715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24716 $as_echo "$SETFILE" >&6; }
24717 else
24718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24719 $as_echo "no" >&6; }
24720 fi
24721 
24722 
24723           if test "x$SETFILE" = x; then
24724             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24725           fi
24726         else
24727           # Otherwise we believe it is a complete path. Use it as it is.
24728           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24729 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24730           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24731 $as_echo_n "checking for SETFILE... " >&6; }
24732           if test ! -x "$tool_specified"; then
24733             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24734 $as_echo "not found" >&6; }
24735             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24736           fi
24737           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24738 $as_echo "$tool_specified" >&6; }
24739         fi
24740       fi
24741     fi
24742 
24743   fi
24744 
24745 
24746 
24747   if test "x$SETFILE" = x; then
24748     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24749   fi
24750 
24751 
24752   fi
24753 
24754 
24755   # Check bash version
24756   # Extra [ ] to stop m4 mangling
24757    BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24758   { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24759 $as_echo_n "checking bash version... " >&6; }
24760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24761 $as_echo "$BASH_VER" >&6; }
24762 
24763   BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24764   BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24765   if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24766     as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24767   fi
24768 
24769   # Test if bash supports pipefail.
24770   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24771 $as_echo_n "checking if bash supports pipefail... " >&6; }
24772   if ${BASH} -c 'set -o pipefail'; then
24773     BASH_ARGS="$BASH_ARGS -o pipefail"
24774     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24775 $as_echo "yes" >&6; }
24776   else
24777     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24778 $as_echo "no" >&6; }
24779   fi
24780 
24781   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24782 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24783   if ${BASH} -e -c 'true'; then
24784     BASH_ARGS="$BASH_ARGS -e"
24785     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24786 $as_echo "yes" >&6; }
24787   else
24788     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24789 $as_echo "no" >&6; }
24790   fi
24791 
24792 
24793 
24794 
24795 # Check if pkg-config is available.
24796 
24797 
24798 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24799         if test -n "$ac_tool_prefix"; then
24800   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24801 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24803 $as_echo_n "checking for $ac_word... " >&6; }
24804 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24805   $as_echo_n "(cached) " >&6
24806 else
24807   case $PKG_CONFIG in
24808   [\\/]* | ?:[\\/]*)
24809   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24810   ;;
24811   *)
24812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24813 for as_dir in $PATH
24814 do
24815   IFS=$as_save_IFS
24816   test -z "$as_dir" && as_dir=.
24817     for ac_exec_ext in '' $ac_executable_extensions; do
24818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24819     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24821     break 2
24822   fi
24823 done
24824   done
24825 IFS=$as_save_IFS
24826 
24827   ;;
24828 esac
24829 fi
24830 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24831 if test -n "$PKG_CONFIG"; then
24832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24833 $as_echo "$PKG_CONFIG" >&6; }
24834 else
24835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24836 $as_echo "no" >&6; }
24837 fi
24838 
24839 
24840 fi
24841 if test -z "$ac_cv_path_PKG_CONFIG"; then
24842   ac_pt_PKG_CONFIG=$PKG_CONFIG
24843   # Extract the first word of "pkg-config", so it can be a program name with args.
24844 set dummy pkg-config; ac_word=$2
24845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24846 $as_echo_n "checking for $ac_word... " >&6; }
24847 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24848   $as_echo_n "(cached) " >&6
24849 else
24850   case $ac_pt_PKG_CONFIG in
24851   [\\/]* | ?:[\\/]*)
24852   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24853   ;;
24854   *)
24855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24856 for as_dir in $PATH
24857 do
24858   IFS=$as_save_IFS
24859   test -z "$as_dir" && as_dir=.
24860     for ac_exec_ext in '' $ac_executable_extensions; do
24861   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24862     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24864     break 2
24865   fi
24866 done
24867   done
24868 IFS=$as_save_IFS
24869 
24870   ;;
24871 esac
24872 fi
24873 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24874 if test -n "$ac_pt_PKG_CONFIG"; then
24875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24876 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24877 else
24878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24879 $as_echo "no" >&6; }
24880 fi
24881 
24882   if test "x$ac_pt_PKG_CONFIG" = x; then
24883     PKG_CONFIG=""
24884   else
24885     case $cross_compiling:$ac_tool_warned in
24886 yes:)
24887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24888 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24889 ac_tool_warned=yes ;;
24890 esac
24891     PKG_CONFIG=$ac_pt_PKG_CONFIG
24892   fi
24893 else
24894   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24895 fi
24896 
24897 fi
24898 if test -n "$PKG_CONFIG"; then
24899         _pkg_min_version=0.9.0
24900         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24901 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24902         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24903                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24904 $as_echo "yes" >&6; }
24905         else
24906                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24907 $as_echo "no" >&6; }
24908                 PKG_CONFIG=""
24909         fi
24910 
24911 fi
24912 
24913 # After basic tools have been setup, we can check build os specific details.
24914 
24915   ###############################################################################
24916 
24917   # Note that this is the build platform OS version!
24918 
24919   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24920   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24921   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24922   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24923 
24924 
24925 
24926 
24927 
24928 # Misc basic settings
24929 
24930 
24931 # Check whether --with-default-make-target was given.
24932 if test "${with_default_make_target+set}" = set; then :
24933   withval=$with_default_make_target;
24934 fi
24935 
24936   if test "x$with_default_make_target" = "x" \
24937       || test "x$with_default_make_target" = "xyes"; then
24938     DEFAULT_MAKE_TARGET="exploded-image"
24939   elif test "x$with_default_make_target" = "xno"; then
24940     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24941   else
24942     DEFAULT_MAKE_TARGET="$with_default_make_target"
24943   fi
24944 
24945 
24946 
24947 
24948 ###############################################################################
24949 #
24950 # Determine OpenJDK variants, options and version numbers.
24951 #
24952 ###############################################################################
24953 
24954 # We need build & target for this.
24955 
24956   # Should we build a JDK without a graphical UI?
24957   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24958 $as_echo_n "checking headless only... " >&6; }
24959   # Check whether --enable-headless-only was given.
24960 if test "${enable_headless_only+set}" = set; then :
24961   enableval=$enable_headless_only;
24962 fi
24963 
24964 
24965   if test "x$enable_headless_only" = "xyes"; then
24966     ENABLE_HEADLESS_ONLY="true"
24967     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24968 $as_echo "yes" >&6; }
24969   elif test "x$enable_headless_only" = "xno"; then
24970     ENABLE_HEADLESS_ONLY="false"
24971     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24972 $as_echo "no" >&6; }
24973   elif test "x$enable_headless_only" = "x"; then
24974     ENABLE_HEADLESS_ONLY="false"
24975     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24976 $as_echo "no" >&6; }
24977   else
24978     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24979   fi
24980 
24981 
24982 
24983   # Should we build the complete docs, or just a lightweight version?
24984   # Check whether --enable-full-docs was given.
24985 if test "${enable_full_docs+set}" = set; then :
24986   enableval=$enable_full_docs;
24987 fi
24988 
24989 
24990   # Verify dependencies
24991   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24992 $as_echo_n "checking for graphviz dot... " >&6; }
24993   if test "x$DOT" != "x"; then
24994     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24995 $as_echo "yes" >&6; }
24996   else
24997     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24998 $as_echo "no, cannot generate full docs" >&6; }
24999     FULL_DOCS_DEP_MISSING=true
25000   fi
25001 
25002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
25003 $as_echo_n "checking for pandoc... " >&6; }
25004   if test "x$PANDOC" != "x"; then
25005     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25006 $as_echo "yes" >&6; }
25007   else
25008     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
25009 $as_echo "no, cannot generate full docs" >&6; }
25010     FULL_DOCS_DEP_MISSING=true
25011   fi
25012 
25013   { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
25014 $as_echo_n "checking full docs... " >&6; }
25015   if test "x$enable_full_docs" = xyes; then
25016     if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
25017       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25018 $as_echo "no, missing dependencies" >&6; }
25019 
25020   # Print a helpful message on how to acquire the necessary build dependency.
25021   # dot is the help tag: freetype, cups, alsa etc
25022   MISSING_DEPENDENCY=dot
25023 
25024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25025     cygwin_help $MISSING_DEPENDENCY
25026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25027     msys_help $MISSING_DEPENDENCY
25028   else
25029     PKGHANDLER_COMMAND=
25030 
25031     case $PKGHANDLER in
25032       apt-get)
25033         apt_help     $MISSING_DEPENDENCY ;;
25034       yum)
25035         yum_help     $MISSING_DEPENDENCY ;;
25036       brew)
25037         brew_help    $MISSING_DEPENDENCY ;;
25038       port)
25039         port_help    $MISSING_DEPENDENCY ;;
25040       pkgutil)
25041         pkgutil_help $MISSING_DEPENDENCY ;;
25042       pkgadd)
25043         pkgadd_help  $MISSING_DEPENDENCY ;;
25044     esac
25045 
25046     if test "x$PKGHANDLER_COMMAND" != x; then
25047       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25048     fi
25049   fi
25050 
25051       as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
25052     else
25053       ENABLE_FULL_DOCS=true
25054       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
25055 $as_echo "yes, forced" >&6; }
25056     fi
25057   elif test "x$enable_full_docs" = xno; then
25058     ENABLE_FULL_DOCS=false
25059     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
25060 $as_echo "no, forced" >&6; }
25061   elif test "x$enable_full_docs" = x; then
25062     # Check for prerequisites
25063     if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
25064       ENABLE_FULL_DOCS=false
25065       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25066 $as_echo "no, missing dependencies" >&6; }
25067     else
25068       ENABLE_FULL_DOCS=true
25069       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
25070 $as_echo "yes, dependencies present" >&6; }
25071     fi
25072   else
25073     as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
25074   fi
25075 
25076 
25077 
25078   # Choose cacerts source file
25079 
25080 # Check whether --with-cacerts-file was given.
25081 if test "${with_cacerts_file+set}" = set; then :
25082   withval=$with_cacerts_file;
25083 fi
25084 
25085   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cacerts file" >&5
25086 $as_echo_n "checking for cacerts file... " >&6; }
25087   if test "x$with_cacerts_file" == x; then
25088     { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
25089 $as_echo "default" >&6; }
25090   else
25091     CACERTS_FILE=$with_cacerts_file
25092     if test ! -f "$CACERTS_FILE"; then
25093       { $as_echo "$as_me:${as_lineno-$LINENO}: result: fail" >&5
25094 $as_echo "fail" >&6; }
25095       as_fn_error $? "Specified cacerts file \"$CACERTS_FILE\" does not exist" "$LINENO" 5
25096     fi
25097     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CACERTS_FILE" >&5
25098 $as_echo "$CACERTS_FILE" >&6; }
25099   fi
25100 
25101 
25102   # Enable or disable unlimited crypto
25103   # Check whether --enable-unlimited-crypto was given.
25104 if test "${enable_unlimited_crypto+set}" = set; then :
25105   enableval=$enable_unlimited_crypto;
25106 else
25107   enable_unlimited_crypto=yes
25108 fi
25109 
25110   if test "x$enable_unlimited_crypto" = "xyes"; then
25111     UNLIMITED_CRYPTO=true
25112   else
25113     UNLIMITED_CRYPTO=false
25114   fi
25115 
25116 
25117   # Should we build the serviceability agent (SA)?
25118   INCLUDE_SA=true
25119   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25120     INCLUDE_SA=false
25121   fi
25122   if test "x$OPENJDK_TARGET_OS" = xaix ; then
25123     INCLUDE_SA=false
25124   fi
25125 
25126 
25127   # Compress jars
25128   COMPRESS_JARS=false
25129 
25130 
25131 
25132   # Setup default copyright year. Mostly overridden when building close to a new year.
25133 
25134 # Check whether --with-copyright-year was given.
25135 if test "${with_copyright_year+set}" = set; then :
25136   withval=$with_copyright_year;
25137 fi
25138 
25139   if test "x$with_copyright_year" = xyes; then
25140     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25141   elif test "x$with_copyright_year" != x; then
25142     COPYRIGHT_YEAR="$with_copyright_year"
25143   else
25144     COPYRIGHT_YEAR=`$DATE +'%Y'`
25145   fi
25146 
25147 
25148 
25149   # Check whether --enable-keep-packaged-modules was given.
25150 if test "${enable_keep_packaged_modules+set}" = set; then :
25151   enableval=$enable_keep_packaged_modules;
25152 fi
25153 
25154 
25155   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25156 $as_echo_n "checking if packaged modules are kept... " >&6; }
25157   if test "x$enable_keep_packaged_modules" = "xyes"; then
25158     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25159 $as_echo "yes" >&6; }
25160     JLINK_KEEP_PACKAGED_MODULES=true
25161   elif test "x$enable_keep_packaged_modules" = "xno"; then
25162     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25163 $as_echo "no" >&6; }
25164     JLINK_KEEP_PACKAGED_MODULES=false
25165   elif test "x$enable_keep_packaged_modules" = "x"; then
25166     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25167 $as_echo "yes (default)" >&6; }
25168     JLINK_KEEP_PACKAGED_MODULES=true
25169   else
25170     { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25171 $as_echo "error" >&6; }
25172     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25173   fi
25174 
25175 
25176 
25177 
25178   # Warn user that old version arguments are deprecated.
25179 
25180 
25181 # Check whether --with-milestone was given.
25182 if test "${with_milestone+set}" = set; then :
25183   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25184 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25185 fi
25186 
25187 
25188 
25189 
25190 # Check whether --with-update-version was given.
25191 if test "${with_update_version+set}" = set; then :
25192   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25193 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25194 fi
25195 
25196 
25197 
25198 
25199 # Check whether --with-user-release-suffix was given.
25200 if test "${with_user_release_suffix+set}" = set; then :
25201   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
25202 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25203 fi
25204 
25205 
25206 
25207 
25208 # Check whether --with-build-number was given.
25209 if test "${with_build_number+set}" = set; then :
25210   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25211 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25212 fi
25213 
25214 
25215 
25216   # Source the version numbers file
25217   . $AUTOCONF_DIR/version-numbers
25218 
25219   # Some non-version number information is set in that file
25220 
25221 
25222 
25223 
25224 
25225 
25226 
25227 
25228 
25229   # Override version from arguments
25230 
25231   # If --with-version-string is set, process it first. It is possible to
25232   # override parts with more specific flags, since these are processed later.
25233 
25234 # Check whether --with-version-string was given.
25235 if test "${with_version_string+set}" = set; then :
25236   withval=$with_version_string;
25237 fi
25238 
25239   if test "x$with_version_string" = xyes; then
25240     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25241   elif test "x$with_version_string" != x; then
25242     # Additional [] needed to keep m4 from mangling shell constructs.
25243     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25244       VERSION_MAJOR=${BASH_REMATCH[1]}
25245       VERSION_MINOR=${BASH_REMATCH[3]}
25246       VERSION_SECURITY=${BASH_REMATCH[5]}
25247       VERSION_PATCH=${BASH_REMATCH[7]}
25248       VERSION_PRE=${BASH_REMATCH[9]}
25249       version_plus_separator=${BASH_REMATCH[11]}
25250       VERSION_BUILD=${BASH_REMATCH[12]}
25251       VERSION_OPT=${BASH_REMATCH[14]}
25252       # Unspecified numerical fields are interpreted as 0.
25253       if test "x$VERSION_MINOR" = x; then
25254         VERSION_MINOR=0
25255       fi
25256       if test "x$VERSION_SECURITY" = x; then
25257         VERSION_SECURITY=0
25258       fi
25259       if test "x$VERSION_PATCH" = x; then
25260         VERSION_PATCH=0
25261       fi
25262       if test "x$version_plus_separator" != x \
25263           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25264         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25265       fi
25266       # Stop the version part process from setting default values.
25267       # We still allow them to explicitly override though.
25268       NO_DEFAULT_VERSION_PARTS=true
25269     else
25270       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25271     fi
25272   fi
25273 
25274 
25275 # Check whether --with-version-pre was given.
25276 if test "${with_version_pre+set}" = set; then :
25277   withval=$with_version_pre; with_version_pre_present=true
25278 else
25279   with_version_pre_present=false
25280 fi
25281 
25282 
25283   if test "x$with_version_pre_present" = xtrue; then
25284     if test "x$with_version_pre" = xyes; then
25285       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25286     elif test "x$with_version_pre" = xno; then
25287       # Interpret --without-* as empty string instead of the literal "no"
25288       VERSION_PRE=
25289     else
25290       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25291        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25292       if test "x$VERSION_PRE" != "x$with_version_pre"; then
25293         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25294 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25295       fi
25296     fi
25297   else
25298     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25299       # Default is to use "internal" as pre
25300       VERSION_PRE="internal"
25301     fi
25302   fi
25303 
25304 
25305 # Check whether --with-version-opt was given.
25306 if test "${with_version_opt+set}" = set; then :
25307   withval=$with_version_opt; with_version_opt_present=true
25308 else
25309   with_version_opt_present=false
25310 fi
25311 
25312 
25313   if test "x$with_version_opt_present" = xtrue; then
25314     if test "x$with_version_opt" = xyes; then
25315       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25316     elif test "x$with_version_opt" = xno; then
25317       # Interpret --without-* as empty string instead of the literal "no"
25318       VERSION_OPT=
25319     else
25320       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25321        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25322       if test "x$VERSION_OPT" != "x$with_version_opt"; then
25323         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25324 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25325       fi
25326     fi
25327   else
25328     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25329       # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25330       # Outer [ ] to quote m4.
25331        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25332       VERSION_OPT="adhoc.$USERNAME.$basedirname"
25333     fi
25334   fi
25335 
25336 
25337 # Check whether --with-version-build was given.
25338 if test "${with_version_build+set}" = set; then :
25339   withval=$with_version_build; with_version_build_present=true
25340 else
25341   with_version_build_present=false
25342 fi
25343 
25344 
25345   if test "x$with_version_build_present" = xtrue; then
25346     if test "x$with_version_build" = xyes; then
25347       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25348     elif test "x$with_version_build" = xno; then
25349       # Interpret --without-* as empty string instead of the literal "no"
25350       VERSION_BUILD=
25351     elif test "x$with_version_build" = x; then
25352       VERSION_BUILD=
25353     else
25354 
25355   # Additional [] needed to keep m4 from mangling shell constructs.
25356   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25357     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25358   fi
25359   # Extract the version number without leading zeros.
25360   cleaned_value=${BASH_REMATCH[1]}
25361   if test "x$cleaned_value" = x; then
25362     # Special case for zero
25363     cleaned_value=${BASH_REMATCH[2]}
25364   fi
25365 
25366   if test $cleaned_value -gt 255; then
25367     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25368   fi
25369   if test "x$cleaned_value" != "x$with_version_build"; then
25370     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25371 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25372   fi
25373   VERSION_BUILD=$cleaned_value
25374 
25375     fi
25376   else
25377     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25378       # Default is to not have a build number.
25379       VERSION_BUILD=""
25380       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25381       VERSION_BUILD=0
25382     fi
25383   fi
25384 
25385 
25386 # Check whether --with-version-major was given.
25387 if test "${with_version_major+set}" = set; then :
25388   withval=$with_version_major; with_version_major_present=true
25389 else
25390   with_version_major_present=false
25391 fi
25392 
25393 
25394   if test "x$with_version_major_present" = xtrue; then
25395     if test "x$with_version_major" = xyes; then
25396       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25397     else
25398 
25399   # Additional [] needed to keep m4 from mangling shell constructs.
25400   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25401     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25402   fi
25403   # Extract the version number without leading zeros.
25404   cleaned_value=${BASH_REMATCH[1]}
25405   if test "x$cleaned_value" = x; then
25406     # Special case for zero
25407     cleaned_value=${BASH_REMATCH[2]}
25408   fi
25409 
25410   if test $cleaned_value -gt 255; then
25411     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25412   fi
25413   if test "x$cleaned_value" != "x$with_version_major"; then
25414     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25415 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25416   fi
25417   VERSION_MAJOR=$cleaned_value
25418 
25419     fi
25420   else
25421     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25422       # Default is to get value from version-numbers
25423       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25424     fi
25425   fi
25426 
25427 
25428 # Check whether --with-version-minor was given.
25429 if test "${with_version_minor+set}" = set; then :
25430   withval=$with_version_minor; with_version_minor_present=true
25431 else
25432   with_version_minor_present=false
25433 fi
25434 
25435 
25436   if test "x$with_version_minor_present" = xtrue; then
25437     if test "x$with_version_minor" = xyes; then
25438       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25439     elif test "x$with_version_minor" = xno; then
25440       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25441       VERSION_MINOR=0
25442     elif test "x$with_version_minor" = x; then
25443       VERSION_MINOR=0
25444     else
25445 
25446   # Additional [] needed to keep m4 from mangling shell constructs.
25447   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25448     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25449   fi
25450   # Extract the version number without leading zeros.
25451   cleaned_value=${BASH_REMATCH[1]}
25452   if test "x$cleaned_value" = x; then
25453     # Special case for zero
25454     cleaned_value=${BASH_REMATCH[2]}
25455   fi
25456 
25457   if test $cleaned_value -gt 255; then
25458     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25459   fi
25460   if test "x$cleaned_value" != "x$with_version_minor"; then
25461     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25462 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25463   fi
25464   VERSION_MINOR=$cleaned_value
25465 
25466     fi
25467   else
25468     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25469       # Default is 0, if unspecified
25470       VERSION_MINOR=$DEFAULT_VERSION_MINOR
25471     fi
25472   fi
25473 
25474 
25475 # Check whether --with-version-security was given.
25476 if test "${with_version_security+set}" = set; then :
25477   withval=$with_version_security; with_version_security_present=true
25478 else
25479   with_version_security_present=false
25480 fi
25481 
25482 
25483   if test "x$with_version_security_present" = xtrue; then
25484     if test "x$with_version_security" = xyes; then
25485       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25486     elif test "x$with_version_security" = xno; then
25487       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25488       VERSION_SECURITY=0
25489     elif test "x$with_version_security" = x; then
25490       VERSION_SECURITY=0
25491     else
25492 
25493   # Additional [] needed to keep m4 from mangling shell constructs.
25494   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25495     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25496   fi
25497   # Extract the version number without leading zeros.
25498   cleaned_value=${BASH_REMATCH[1]}
25499   if test "x$cleaned_value" = x; then
25500     # Special case for zero
25501     cleaned_value=${BASH_REMATCH[2]}
25502   fi
25503 
25504   if test $cleaned_value -gt 255; then
25505     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25506   fi
25507   if test "x$cleaned_value" != "x$with_version_security"; then
25508     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25509 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25510   fi
25511   VERSION_SECURITY=$cleaned_value
25512 
25513     fi
25514   else
25515     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25516       # Default is 0, if unspecified
25517       VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25518     fi
25519   fi
25520 
25521 
25522 # Check whether --with-version-patch was given.
25523 if test "${with_version_patch+set}" = set; then :
25524   withval=$with_version_patch; with_version_patch_present=true
25525 else
25526   with_version_patch_present=false
25527 fi
25528 
25529 
25530   if test "x$with_version_patch_present" = xtrue; then
25531     if test "x$with_version_patch" = xyes; then
25532       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25533     elif test "x$with_version_patch" = xno; then
25534       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25535       VERSION_PATCH=0
25536     elif test "x$with_version_patch" = x; then
25537       VERSION_PATCH=0
25538     else
25539 
25540   # Additional [] needed to keep m4 from mangling shell constructs.
25541   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25542     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25543   fi
25544   # Extract the version number without leading zeros.
25545   cleaned_value=${BASH_REMATCH[1]}
25546   if test "x$cleaned_value" = x; then
25547     # Special case for zero
25548     cleaned_value=${BASH_REMATCH[2]}
25549   fi
25550 
25551   if test $cleaned_value -gt 255; then
25552     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25553   fi
25554   if test "x$cleaned_value" != "x$with_version_patch"; then
25555     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25556 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25557   fi
25558   VERSION_PATCH=$cleaned_value
25559 
25560     fi
25561   else
25562     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25563       # Default is 0, if unspecified
25564       VERSION_PATCH=$DEFAULT_VERSION_PATCH
25565     fi
25566   fi
25567 
25568   # Calculate derived version properties
25569 
25570   # Set VERSION_IS_GA based on if VERSION_PRE has a value
25571   if test "x$VERSION_PRE" = x; then
25572     VERSION_IS_GA=true
25573   else
25574     VERSION_IS_GA=false
25575   fi
25576 
25577   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25578   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25579 
25580   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25581   # Strip trailing zeroes from stripped_version_number
25582   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25583   VERSION_NUMBER=$stripped_version_number
25584 
25585   # The complete version string, with additional build information
25586   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25587     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25588   else
25589     # If either build or opt is set, we need a + separator
25590     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25591   fi
25592 
25593   # The short version string, just VERSION_NUMBER and PRE, if present.
25594   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25595 
25596   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25597 $as_echo_n "checking for version string... " >&6; }
25598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25599 $as_echo "$VERSION_STRING" >&6; }
25600 
25601 
25602 
25603 
25604 
25605 
25606 
25607 
25608 
25609 
25610 
25611 
25612 
25613 
25614 
25615 ###############################################################################
25616 #
25617 # Setup BootJDK, used to bootstrap the build.
25618 #
25619 ###############################################################################
25620 
25621 
25622   BOOT_JDK_FOUND=no
25623 
25624 # Check whether --with-boot-jdk was given.
25625 if test "${with_boot_jdk+set}" = set; then :
25626   withval=$with_boot_jdk;
25627 fi
25628 
25629 
25630   # We look for the Boot JDK through various means, going from more certain to
25631   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25632   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25633   # must check if this is indeed valid; otherwise we'll continue looking.
25634 
25635   # Test: Is bootjdk explicitly set by command line arguments?
25636 
25637   if test "x$BOOT_JDK_FOUND" = xno; then
25638     # Now execute the test
25639 
25640   if test "x$with_boot_jdk" != x; then
25641     BOOT_JDK=$with_boot_jdk
25642     BOOT_JDK_FOUND=maybe
25643     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25644 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25645   fi
25646 
25647 
25648     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25649     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25650       # Do we have a bin/java?
25651       if test ! -x "$BOOT_JDK/bin/java"; then
25652         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25653 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25654         BOOT_JDK_FOUND=no
25655       else
25656         # Do we have a bin/javac?
25657         if test ! -x "$BOOT_JDK/bin/javac"; then
25658           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25659 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25660           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25661 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25662           BOOT_JDK_FOUND=no
25663         else
25664           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25665           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25666 
25667           # Extra M4 quote needed to protect [] in grep expression.
25668           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
25669           if test "x$FOUND_CORRECT_VERSION" = x; then
25670             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25671 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25672             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
25673 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
25674             BOOT_JDK_FOUND=no
25675           else
25676             # We're done! :-)
25677             BOOT_JDK_FOUND=yes
25678 
25679   # Only process if variable expands to non-empty
25680 
25681   if test "x$BOOT_JDK" != x; then
25682     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25683 
25684   # Input might be given as Windows format, start by converting to
25685   # unix format.
25686   path="$BOOT_JDK"
25687   new_path=`$CYGPATH -u "$path"`
25688 
25689   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25690   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25691   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25692   # "foo.exe" is OK but "foo" is an error.
25693   #
25694   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25695   # It is also a way to make sure we got the proper file name for the real test later on.
25696   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25697   if test "x$test_shortpath" = x; then
25698     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25699 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25700     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25701   fi
25702 
25703   # Call helper function which possibly converts this using DOS-style short mode.
25704   # If so, the updated path is stored in $new_path.
25705 
25706   input_path="$new_path"
25707   # Check if we need to convert this using DOS-style short mode. If the path
25708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25709   # take no chances and rewrite it.
25710   # Note: m4 eats our [], so we need to use [ and ] instead.
25711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25712   if test "x$has_forbidden_chars" != x; then
25713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25714     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25715     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25716     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25717       # Going to short mode and back again did indeed matter. Since short mode is
25718       # case insensitive, let's make it lowercase to improve readability.
25719       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25720       # Now convert it back to Unix-style (cygpath)
25721       input_path=`$CYGPATH -u "$shortmode_path"`
25722       new_path="$input_path"
25723     fi
25724   fi
25725 
25726   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25727   if test "x$test_cygdrive_prefix" = x; then
25728     # As a simple fix, exclude /usr/bin since it's not a real path.
25729     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25730       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25731       # a path prefixed by /cygdrive for fixpath to work.
25732       new_path="$CYGWIN_ROOT_PATH$input_path"
25733     fi
25734   fi
25735 
25736 
25737   if test "x$path" != "x$new_path"; then
25738     BOOT_JDK="$new_path"
25739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25740 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25741   fi
25742 
25743     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25744 
25745   path="$BOOT_JDK"
25746   has_colon=`$ECHO $path | $GREP ^.:`
25747   new_path="$path"
25748   if test "x$has_colon" = x; then
25749     # Not in mixed or Windows style, start by that.
25750     new_path=`cmd //c echo $path`
25751   fi
25752 
25753 
25754   input_path="$new_path"
25755   # Check if we need to convert this using DOS-style short mode. If the path
25756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25757   # take no chances and rewrite it.
25758   # Note: m4 eats our [], so we need to use [ and ] instead.
25759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25760   if test "x$has_forbidden_chars" != x; then
25761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25762     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25763   fi
25764 
25765 
25766   windows_path="$new_path"
25767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25768     unix_path=`$CYGPATH -u "$windows_path"`
25769     new_path="$unix_path"
25770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25772     new_path="$unix_path"
25773   fi
25774 
25775   if test "x$path" != "x$new_path"; then
25776     BOOT_JDK="$new_path"
25777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25778 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25779   fi
25780 
25781   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25782   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25783 
25784     else
25785       # We're on a unix platform. Hooray! :)
25786       path="$BOOT_JDK"
25787       has_space=`$ECHO "$path" | $GREP " "`
25788       if test "x$has_space" != x; then
25789         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25790 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25791         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25792       fi
25793 
25794       # Use eval to expand a potential ~
25795       eval path="$path"
25796       if test ! -f "$path" && test ! -d "$path"; then
25797         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25798       fi
25799 
25800       if test -d "$path"; then
25801         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25802       else
25803         dir="`$DIRNAME "$path"`"
25804         base="`$BASENAME "$path"`"
25805         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25806       fi
25807     fi
25808   fi
25809 
25810             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25811 $as_echo_n "checking for Boot JDK... " >&6; }
25812             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25813 $as_echo "$BOOT_JDK" >&6; }
25814             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25815 $as_echo_n "checking Boot JDK version... " >&6; }
25816             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25817             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25818 $as_echo "$BOOT_JDK_VERSION" >&6; }
25819           fi # end check jdk version
25820         fi # end check javac
25821       fi # end check java
25822     fi # end check boot jdk found
25823   fi
25824 
25825   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25826     # Having specified an argument which is incorrect will produce an instant failure;
25827     # we should not go on looking
25828     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25829   fi
25830 
25831   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25832 
25833   if test "x$BOOT_JDK_FOUND" = xno; then
25834     # Now execute the test
25835 
25836   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25837     # First check at user selected default
25838 
25839   if test "x$BOOT_JDK_FOUND" = xno; then
25840     # Now execute the test
25841 
25842   if test -x /usr/libexec/java_home; then
25843     BOOT_JDK=`/usr/libexec/java_home `
25844     BOOT_JDK_FOUND=maybe
25845     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25846 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25847   fi
25848 
25849 
25850     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25851     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25852       # Do we have a bin/java?
25853       if test ! -x "$BOOT_JDK/bin/java"; then
25854         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25855 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25856         BOOT_JDK_FOUND=no
25857       else
25858         # Do we have a bin/javac?
25859         if test ! -x "$BOOT_JDK/bin/javac"; then
25860           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25861 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25862           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25863 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25864           BOOT_JDK_FOUND=no
25865         else
25866           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25867           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25868 
25869           # Extra M4 quote needed to protect [] in grep expression.
25870           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
25871           if test "x$FOUND_CORRECT_VERSION" = x; then
25872             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25873 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25874             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
25875 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
25876             BOOT_JDK_FOUND=no
25877           else
25878             # We're done! :-)
25879             BOOT_JDK_FOUND=yes
25880 
25881   # Only process if variable expands to non-empty
25882 
25883   if test "x$BOOT_JDK" != x; then
25884     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25885 
25886   # Input might be given as Windows format, start by converting to
25887   # unix format.
25888   path="$BOOT_JDK"
25889   new_path=`$CYGPATH -u "$path"`
25890 
25891   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25892   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25893   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25894   # "foo.exe" is OK but "foo" is an error.
25895   #
25896   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25897   # It is also a way to make sure we got the proper file name for the real test later on.
25898   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25899   if test "x$test_shortpath" = x; then
25900     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25901 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25902     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25903   fi
25904 
25905   # Call helper function which possibly converts this using DOS-style short mode.
25906   # If so, the updated path is stored in $new_path.
25907 
25908   input_path="$new_path"
25909   # Check if we need to convert this using DOS-style short mode. If the path
25910   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25911   # take no chances and rewrite it.
25912   # Note: m4 eats our [], so we need to use [ and ] instead.
25913   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25914   if test "x$has_forbidden_chars" != x; then
25915     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25916     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25917     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25918     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25919       # Going to short mode and back again did indeed matter. Since short mode is
25920       # case insensitive, let's make it lowercase to improve readability.
25921       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25922       # Now convert it back to Unix-style (cygpath)
25923       input_path=`$CYGPATH -u "$shortmode_path"`
25924       new_path="$input_path"
25925     fi
25926   fi
25927 
25928   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25929   if test "x$test_cygdrive_prefix" = x; then
25930     # As a simple fix, exclude /usr/bin since it's not a real path.
25931     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25932       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25933       # a path prefixed by /cygdrive for fixpath to work.
25934       new_path="$CYGWIN_ROOT_PATH$input_path"
25935     fi
25936   fi
25937 
25938 
25939   if test "x$path" != "x$new_path"; then
25940     BOOT_JDK="$new_path"
25941     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25942 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25943   fi
25944 
25945     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25946 
25947   path="$BOOT_JDK"
25948   has_colon=`$ECHO $path | $GREP ^.:`
25949   new_path="$path"
25950   if test "x$has_colon" = x; then
25951     # Not in mixed or Windows style, start by that.
25952     new_path=`cmd //c echo $path`
25953   fi
25954 
25955 
25956   input_path="$new_path"
25957   # Check if we need to convert this using DOS-style short mode. If the path
25958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25959   # take no chances and rewrite it.
25960   # Note: m4 eats our [], so we need to use [ and ] instead.
25961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25962   if test "x$has_forbidden_chars" != x; then
25963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25964     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25965   fi
25966 
25967 
25968   windows_path="$new_path"
25969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25970     unix_path=`$CYGPATH -u "$windows_path"`
25971     new_path="$unix_path"
25972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25974     new_path="$unix_path"
25975   fi
25976 
25977   if test "x$path" != "x$new_path"; then
25978     BOOT_JDK="$new_path"
25979     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25980 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25981   fi
25982 
25983   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25984   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25985 
25986     else
25987       # We're on a unix platform. Hooray! :)
25988       path="$BOOT_JDK"
25989       has_space=`$ECHO "$path" | $GREP " "`
25990       if test "x$has_space" != x; then
25991         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25992 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25993         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25994       fi
25995 
25996       # Use eval to expand a potential ~
25997       eval path="$path"
25998       if test ! -f "$path" && test ! -d "$path"; then
25999         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26000       fi
26001 
26002       if test -d "$path"; then
26003         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26004       else
26005         dir="`$DIRNAME "$path"`"
26006         base="`$BASENAME "$path"`"
26007         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26008       fi
26009     fi
26010   fi
26011 
26012             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26013 $as_echo_n "checking for Boot JDK... " >&6; }
26014             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26015 $as_echo "$BOOT_JDK" >&6; }
26016             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26017 $as_echo_n "checking Boot JDK version... " >&6; }
26018             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26019             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26020 $as_echo "$BOOT_JDK_VERSION" >&6; }
26021           fi # end check jdk version
26022         fi # end check javac
26023       fi # end check java
26024     fi # end check boot jdk found
26025   fi
26026 
26027     # If that did not work out (e.g. too old), try explicit versions instead
26028 
26029   if test "x$BOOT_JDK_FOUND" = xno; then
26030     # Now execute the test
26031 
26032   if test -x /usr/libexec/java_home; then
26033     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
26034     BOOT_JDK_FOUND=maybe
26035     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
26036 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
26037   fi
26038 
26039 
26040     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26041     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26042       # Do we have a bin/java?
26043       if test ! -x "$BOOT_JDK/bin/java"; then
26044         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26045 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26046         BOOT_JDK_FOUND=no
26047       else
26048         # Do we have a bin/javac?
26049         if test ! -x "$BOOT_JDK/bin/javac"; then
26050           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26051 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26052           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26053 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26054           BOOT_JDK_FOUND=no
26055         else
26056           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26057           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26058 
26059           # Extra M4 quote needed to protect [] in grep expression.
26060           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
26061           if test "x$FOUND_CORRECT_VERSION" = x; then
26062             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26063 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26064             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
26065 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
26066             BOOT_JDK_FOUND=no
26067           else
26068             # We're done! :-)
26069             BOOT_JDK_FOUND=yes
26070 
26071   # Only process if variable expands to non-empty
26072 
26073   if test "x$BOOT_JDK" != x; then
26074     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26075 
26076   # Input might be given as Windows format, start by converting to
26077   # unix format.
26078   path="$BOOT_JDK"
26079   new_path=`$CYGPATH -u "$path"`
26080 
26081   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26082   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26083   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26084   # "foo.exe" is OK but "foo" is an error.
26085   #
26086   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26087   # It is also a way to make sure we got the proper file name for the real test later on.
26088   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26089   if test "x$test_shortpath" = x; then
26090     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26091 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26092     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26093   fi
26094 
26095   # Call helper function which possibly converts this using DOS-style short mode.
26096   # If so, the updated path is stored in $new_path.
26097 
26098   input_path="$new_path"
26099   # Check if we need to convert this using DOS-style short mode. If the path
26100   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26101   # take no chances and rewrite it.
26102   # Note: m4 eats our [], so we need to use [ and ] instead.
26103   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26104   if test "x$has_forbidden_chars" != x; then
26105     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26106     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26107     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26108     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26109       # Going to short mode and back again did indeed matter. Since short mode is
26110       # case insensitive, let's make it lowercase to improve readability.
26111       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26112       # Now convert it back to Unix-style (cygpath)
26113       input_path=`$CYGPATH -u "$shortmode_path"`
26114       new_path="$input_path"
26115     fi
26116   fi
26117 
26118   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26119   if test "x$test_cygdrive_prefix" = x; then
26120     # As a simple fix, exclude /usr/bin since it's not a real path.
26121     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26122       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26123       # a path prefixed by /cygdrive for fixpath to work.
26124       new_path="$CYGWIN_ROOT_PATH$input_path"
26125     fi
26126   fi
26127 
26128 
26129   if test "x$path" != "x$new_path"; then
26130     BOOT_JDK="$new_path"
26131     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26132 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26133   fi
26134 
26135     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26136 
26137   path="$BOOT_JDK"
26138   has_colon=`$ECHO $path | $GREP ^.:`
26139   new_path="$path"
26140   if test "x$has_colon" = x; then
26141     # Not in mixed or Windows style, start by that.
26142     new_path=`cmd //c echo $path`
26143   fi
26144 
26145 
26146   input_path="$new_path"
26147   # Check if we need to convert this using DOS-style short mode. If the path
26148   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26149   # take no chances and rewrite it.
26150   # Note: m4 eats our [], so we need to use [ and ] instead.
26151   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26152   if test "x$has_forbidden_chars" != x; then
26153     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26154     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26155   fi
26156 
26157 
26158   windows_path="$new_path"
26159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26160     unix_path=`$CYGPATH -u "$windows_path"`
26161     new_path="$unix_path"
26162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26164     new_path="$unix_path"
26165   fi
26166 
26167   if test "x$path" != "x$new_path"; then
26168     BOOT_JDK="$new_path"
26169     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26170 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26171   fi
26172 
26173   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26174   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26175 
26176     else
26177       # We're on a unix platform. Hooray! :)
26178       path="$BOOT_JDK"
26179       has_space=`$ECHO "$path" | $GREP " "`
26180       if test "x$has_space" != x; then
26181         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26182 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26183         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26184       fi
26185 
26186       # Use eval to expand a potential ~
26187       eval path="$path"
26188       if test ! -f "$path" && test ! -d "$path"; then
26189         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26190       fi
26191 
26192       if test -d "$path"; then
26193         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26194       else
26195         dir="`$DIRNAME "$path"`"
26196         base="`$BASENAME "$path"`"
26197         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26198       fi
26199     fi
26200   fi
26201 
26202             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26203 $as_echo_n "checking for Boot JDK... " >&6; }
26204             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26205 $as_echo "$BOOT_JDK" >&6; }
26206             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26207 $as_echo_n "checking Boot JDK version... " >&6; }
26208             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26210 $as_echo "$BOOT_JDK_VERSION" >&6; }
26211           fi # end check jdk version
26212         fi # end check javac
26213       fi # end check java
26214     fi # end check boot jdk found
26215   fi
26216 
26217 
26218   if test "x$BOOT_JDK_FOUND" = xno; then
26219     # Now execute the test
26220 
26221   if test -x /usr/libexec/java_home; then
26222     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26223     BOOT_JDK_FOUND=maybe
26224     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26225 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26226   fi
26227 
26228 
26229     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26230     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26231       # Do we have a bin/java?
26232       if test ! -x "$BOOT_JDK/bin/java"; then
26233         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26234 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26235         BOOT_JDK_FOUND=no
26236       else
26237         # Do we have a bin/javac?
26238         if test ! -x "$BOOT_JDK/bin/javac"; then
26239           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26240 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26241           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26242 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26243           BOOT_JDK_FOUND=no
26244         else
26245           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26246           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26247 
26248           # Extra M4 quote needed to protect [] in grep expression.
26249           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
26250           if test "x$FOUND_CORRECT_VERSION" = x; then
26251             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26252 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26253             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
26254 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
26255             BOOT_JDK_FOUND=no
26256           else
26257             # We're done! :-)
26258             BOOT_JDK_FOUND=yes
26259 
26260   # Only process if variable expands to non-empty
26261 
26262   if test "x$BOOT_JDK" != x; then
26263     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26264 
26265   # Input might be given as Windows format, start by converting to
26266   # unix format.
26267   path="$BOOT_JDK"
26268   new_path=`$CYGPATH -u "$path"`
26269 
26270   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26271   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26272   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26273   # "foo.exe" is OK but "foo" is an error.
26274   #
26275   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26276   # It is also a way to make sure we got the proper file name for the real test later on.
26277   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26278   if test "x$test_shortpath" = x; then
26279     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26280 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26281     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26282   fi
26283 
26284   # Call helper function which possibly converts this using DOS-style short mode.
26285   # If so, the updated path is stored in $new_path.
26286 
26287   input_path="$new_path"
26288   # Check if we need to convert this using DOS-style short mode. If the path
26289   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26290   # take no chances and rewrite it.
26291   # Note: m4 eats our [], so we need to use [ and ] instead.
26292   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26293   if test "x$has_forbidden_chars" != x; then
26294     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26295     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26296     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26297     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26298       # Going to short mode and back again did indeed matter. Since short mode is
26299       # case insensitive, let's make it lowercase to improve readability.
26300       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26301       # Now convert it back to Unix-style (cygpath)
26302       input_path=`$CYGPATH -u "$shortmode_path"`
26303       new_path="$input_path"
26304     fi
26305   fi
26306 
26307   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26308   if test "x$test_cygdrive_prefix" = x; then
26309     # As a simple fix, exclude /usr/bin since it's not a real path.
26310     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26311       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26312       # a path prefixed by /cygdrive for fixpath to work.
26313       new_path="$CYGWIN_ROOT_PATH$input_path"
26314     fi
26315   fi
26316 
26317 
26318   if test "x$path" != "x$new_path"; then
26319     BOOT_JDK="$new_path"
26320     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26321 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26322   fi
26323 
26324     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26325 
26326   path="$BOOT_JDK"
26327   has_colon=`$ECHO $path | $GREP ^.:`
26328   new_path="$path"
26329   if test "x$has_colon" = x; then
26330     # Not in mixed or Windows style, start by that.
26331     new_path=`cmd //c echo $path`
26332   fi
26333 
26334 
26335   input_path="$new_path"
26336   # Check if we need to convert this using DOS-style short mode. If the path
26337   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26338   # take no chances and rewrite it.
26339   # Note: m4 eats our [], so we need to use [ and ] instead.
26340   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26341   if test "x$has_forbidden_chars" != x; then
26342     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26343     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26344   fi
26345 
26346 
26347   windows_path="$new_path"
26348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26349     unix_path=`$CYGPATH -u "$windows_path"`
26350     new_path="$unix_path"
26351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26353     new_path="$unix_path"
26354   fi
26355 
26356   if test "x$path" != "x$new_path"; then
26357     BOOT_JDK="$new_path"
26358     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26359 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26360   fi
26361 
26362   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26363   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26364 
26365     else
26366       # We're on a unix platform. Hooray! :)
26367       path="$BOOT_JDK"
26368       has_space=`$ECHO "$path" | $GREP " "`
26369       if test "x$has_space" != x; then
26370         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26371 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26372         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26373       fi
26374 
26375       # Use eval to expand a potential ~
26376       eval path="$path"
26377       if test ! -f "$path" && test ! -d "$path"; then
26378         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26379       fi
26380 
26381       if test -d "$path"; then
26382         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26383       else
26384         dir="`$DIRNAME "$path"`"
26385         base="`$BASENAME "$path"`"
26386         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26387       fi
26388     fi
26389   fi
26390 
26391             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26392 $as_echo_n "checking for Boot JDK... " >&6; }
26393             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26394 $as_echo "$BOOT_JDK" >&6; }
26395             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26396 $as_echo_n "checking Boot JDK version... " >&6; }
26397             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26398             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26399 $as_echo "$BOOT_JDK_VERSION" >&6; }
26400           fi # end check jdk version
26401         fi # end check javac
26402       fi # end check java
26403     fi # end check boot jdk found
26404   fi
26405 
26406 
26407   if test "x$BOOT_JDK_FOUND" = xno; then
26408     # Now execute the test
26409 
26410   if test -x /usr/libexec/java_home; then
26411     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26412     BOOT_JDK_FOUND=maybe
26413     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26414 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26415   fi
26416 
26417 
26418     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26419     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26420       # Do we have a bin/java?
26421       if test ! -x "$BOOT_JDK/bin/java"; then
26422         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26423 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26424         BOOT_JDK_FOUND=no
26425       else
26426         # Do we have a bin/javac?
26427         if test ! -x "$BOOT_JDK/bin/javac"; then
26428           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26430           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26431 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26432           BOOT_JDK_FOUND=no
26433         else
26434           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26435           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26436 
26437           # Extra M4 quote needed to protect [] in grep expression.
26438           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
26439           if test "x$FOUND_CORRECT_VERSION" = x; then
26440             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26441 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26442             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
26443 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
26444             BOOT_JDK_FOUND=no
26445           else
26446             # We're done! :-)
26447             BOOT_JDK_FOUND=yes
26448 
26449   # Only process if variable expands to non-empty
26450 
26451   if test "x$BOOT_JDK" != x; then
26452     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26453 
26454   # Input might be given as Windows format, start by converting to
26455   # unix format.
26456   path="$BOOT_JDK"
26457   new_path=`$CYGPATH -u "$path"`
26458 
26459   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26460   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26461   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26462   # "foo.exe" is OK but "foo" is an error.
26463   #
26464   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26465   # It is also a way to make sure we got the proper file name for the real test later on.
26466   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26467   if test "x$test_shortpath" = x; then
26468     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26469 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26470     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26471   fi
26472 
26473   # Call helper function which possibly converts this using DOS-style short mode.
26474   # If so, the updated path is stored in $new_path.
26475 
26476   input_path="$new_path"
26477   # Check if we need to convert this using DOS-style short mode. If the path
26478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26479   # take no chances and rewrite it.
26480   # Note: m4 eats our [], so we need to use [ and ] instead.
26481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26482   if test "x$has_forbidden_chars" != x; then
26483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26487       # Going to short mode and back again did indeed matter. Since short mode is
26488       # case insensitive, let's make it lowercase to improve readability.
26489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26490       # Now convert it back to Unix-style (cygpath)
26491       input_path=`$CYGPATH -u "$shortmode_path"`
26492       new_path="$input_path"
26493     fi
26494   fi
26495 
26496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26497   if test "x$test_cygdrive_prefix" = x; then
26498     # As a simple fix, exclude /usr/bin since it's not a real path.
26499     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26501       # a path prefixed by /cygdrive for fixpath to work.
26502       new_path="$CYGWIN_ROOT_PATH$input_path"
26503     fi
26504   fi
26505 
26506 
26507   if test "x$path" != "x$new_path"; then
26508     BOOT_JDK="$new_path"
26509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26510 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26511   fi
26512 
26513     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26514 
26515   path="$BOOT_JDK"
26516   has_colon=`$ECHO $path | $GREP ^.:`
26517   new_path="$path"
26518   if test "x$has_colon" = x; then
26519     # Not in mixed or Windows style, start by that.
26520     new_path=`cmd //c echo $path`
26521   fi
26522 
26523 
26524   input_path="$new_path"
26525   # Check if we need to convert this using DOS-style short mode. If the path
26526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26527   # take no chances and rewrite it.
26528   # Note: m4 eats our [], so we need to use [ and ] instead.
26529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26530   if test "x$has_forbidden_chars" != x; then
26531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26533   fi
26534 
26535 
26536   windows_path="$new_path"
26537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26538     unix_path=`$CYGPATH -u "$windows_path"`
26539     new_path="$unix_path"
26540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26542     new_path="$unix_path"
26543   fi
26544 
26545   if test "x$path" != "x$new_path"; then
26546     BOOT_JDK="$new_path"
26547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26549   fi
26550 
26551   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26552   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26553 
26554     else
26555       # We're on a unix platform. Hooray! :)
26556       path="$BOOT_JDK"
26557       has_space=`$ECHO "$path" | $GREP " "`
26558       if test "x$has_space" != x; then
26559         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26560 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26561         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26562       fi
26563 
26564       # Use eval to expand a potential ~
26565       eval path="$path"
26566       if test ! -f "$path" && test ! -d "$path"; then
26567         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26568       fi
26569 
26570       if test -d "$path"; then
26571         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26572       else
26573         dir="`$DIRNAME "$path"`"
26574         base="`$BASENAME "$path"`"
26575         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26576       fi
26577     fi
26578   fi
26579 
26580             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26581 $as_echo_n "checking for Boot JDK... " >&6; }
26582             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26583 $as_echo "$BOOT_JDK" >&6; }
26584             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26585 $as_echo_n "checking Boot JDK version... " >&6; }
26586             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26587             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26588 $as_echo "$BOOT_JDK_VERSION" >&6; }
26589           fi # end check jdk version
26590         fi # end check javac
26591       fi # end check java
26592     fi # end check boot jdk found
26593   fi
26594 
26595   fi
26596 
26597 
26598     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26599     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26600       # Do we have a bin/java?
26601       if test ! -x "$BOOT_JDK/bin/java"; then
26602         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26603 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26604         BOOT_JDK_FOUND=no
26605       else
26606         # Do we have a bin/javac?
26607         if test ! -x "$BOOT_JDK/bin/javac"; then
26608           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26609 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26610           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26611 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26612           BOOT_JDK_FOUND=no
26613         else
26614           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26615           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26616 
26617           # Extra M4 quote needed to protect [] in grep expression.
26618           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
26619           if test "x$FOUND_CORRECT_VERSION" = x; then
26620             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26621 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26622             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
26623 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
26624             BOOT_JDK_FOUND=no
26625           else
26626             # We're done! :-)
26627             BOOT_JDK_FOUND=yes
26628 
26629   # Only process if variable expands to non-empty
26630 
26631   if test "x$BOOT_JDK" != x; then
26632     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26633 
26634   # Input might be given as Windows format, start by converting to
26635   # unix format.
26636   path="$BOOT_JDK"
26637   new_path=`$CYGPATH -u "$path"`
26638 
26639   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26640   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26641   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26642   # "foo.exe" is OK but "foo" is an error.
26643   #
26644   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26645   # It is also a way to make sure we got the proper file name for the real test later on.
26646   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26647   if test "x$test_shortpath" = x; then
26648     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26649 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26650     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26651   fi
26652 
26653   # Call helper function which possibly converts this using DOS-style short mode.
26654   # If so, the updated path is stored in $new_path.
26655 
26656   input_path="$new_path"
26657   # Check if we need to convert this using DOS-style short mode. If the path
26658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26659   # take no chances and rewrite it.
26660   # Note: m4 eats our [], so we need to use [ and ] instead.
26661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26662   if test "x$has_forbidden_chars" != x; then
26663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26664     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26665     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26666     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26667       # Going to short mode and back again did indeed matter. Since short mode is
26668       # case insensitive, let's make it lowercase to improve readability.
26669       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26670       # Now convert it back to Unix-style (cygpath)
26671       input_path=`$CYGPATH -u "$shortmode_path"`
26672       new_path="$input_path"
26673     fi
26674   fi
26675 
26676   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26677   if test "x$test_cygdrive_prefix" = x; then
26678     # As a simple fix, exclude /usr/bin since it's not a real path.
26679     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26680       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26681       # a path prefixed by /cygdrive for fixpath to work.
26682       new_path="$CYGWIN_ROOT_PATH$input_path"
26683     fi
26684   fi
26685 
26686 
26687   if test "x$path" != "x$new_path"; then
26688     BOOT_JDK="$new_path"
26689     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26690 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26691   fi
26692 
26693     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26694 
26695   path="$BOOT_JDK"
26696   has_colon=`$ECHO $path | $GREP ^.:`
26697   new_path="$path"
26698   if test "x$has_colon" = x; then
26699     # Not in mixed or Windows style, start by that.
26700     new_path=`cmd //c echo $path`
26701   fi
26702 
26703 
26704   input_path="$new_path"
26705   # Check if we need to convert this using DOS-style short mode. If the path
26706   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26707   # take no chances and rewrite it.
26708   # Note: m4 eats our [], so we need to use [ and ] instead.
26709   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26710   if test "x$has_forbidden_chars" != x; then
26711     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26712     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26713   fi
26714 
26715 
26716   windows_path="$new_path"
26717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26718     unix_path=`$CYGPATH -u "$windows_path"`
26719     new_path="$unix_path"
26720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26722     new_path="$unix_path"
26723   fi
26724 
26725   if test "x$path" != "x$new_path"; then
26726     BOOT_JDK="$new_path"
26727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26728 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26729   fi
26730 
26731   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26732   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26733 
26734     else
26735       # We're on a unix platform. Hooray! :)
26736       path="$BOOT_JDK"
26737       has_space=`$ECHO "$path" | $GREP " "`
26738       if test "x$has_space" != x; then
26739         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26740 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26741         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26742       fi
26743 
26744       # Use eval to expand a potential ~
26745       eval path="$path"
26746       if test ! -f "$path" && test ! -d "$path"; then
26747         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26748       fi
26749 
26750       if test -d "$path"; then
26751         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26752       else
26753         dir="`$DIRNAME "$path"`"
26754         base="`$BASENAME "$path"`"
26755         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26756       fi
26757     fi
26758   fi
26759 
26760             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26761 $as_echo_n "checking for Boot JDK... " >&6; }
26762             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26763 $as_echo "$BOOT_JDK" >&6; }
26764             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26765 $as_echo_n "checking Boot JDK version... " >&6; }
26766             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26767             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26768 $as_echo "$BOOT_JDK_VERSION" >&6; }
26769           fi # end check jdk version
26770         fi # end check javac
26771       fi # end check java
26772     fi # end check boot jdk found
26773   fi
26774 
26775 
26776   # Test: Is $JAVA_HOME set?
26777 
26778   if test "x$BOOT_JDK_FOUND" = xno; then
26779     # Now execute the test
26780 
26781   if test "x$JAVA_HOME" != x; then
26782     JAVA_HOME_PROCESSED="$JAVA_HOME"
26783 
26784   # Only process if variable expands to non-empty
26785 
26786   if test "x$JAVA_HOME_PROCESSED" != x; then
26787     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26788 
26789   # Input might be given as Windows format, start by converting to
26790   # unix format.
26791   path="$JAVA_HOME_PROCESSED"
26792   new_path=`$CYGPATH -u "$path"`
26793 
26794   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26795   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26796   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26797   # "foo.exe" is OK but "foo" is an error.
26798   #
26799   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26800   # It is also a way to make sure we got the proper file name for the real test later on.
26801   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26802   if test "x$test_shortpath" = x; then
26803     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26804 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26805     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26806   fi
26807 
26808   # Call helper function which possibly converts this using DOS-style short mode.
26809   # If so, the updated path is stored in $new_path.
26810 
26811   input_path="$new_path"
26812   # Check if we need to convert this using DOS-style short mode. If the path
26813   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26814   # take no chances and rewrite it.
26815   # Note: m4 eats our [], so we need to use [ and ] instead.
26816   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26817   if test "x$has_forbidden_chars" != x; then
26818     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26819     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26820     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26821     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26822       # Going to short mode and back again did indeed matter. Since short mode is
26823       # case insensitive, let's make it lowercase to improve readability.
26824       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26825       # Now convert it back to Unix-style (cygpath)
26826       input_path=`$CYGPATH -u "$shortmode_path"`
26827       new_path="$input_path"
26828     fi
26829   fi
26830 
26831   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26832   if test "x$test_cygdrive_prefix" = x; then
26833     # As a simple fix, exclude /usr/bin since it's not a real path.
26834     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26835       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26836       # a path prefixed by /cygdrive for fixpath to work.
26837       new_path="$CYGWIN_ROOT_PATH$input_path"
26838     fi
26839   fi
26840 
26841 
26842   if test "x$path" != "x$new_path"; then
26843     JAVA_HOME_PROCESSED="$new_path"
26844     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26845 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26846   fi
26847 
26848     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26849 
26850   path="$JAVA_HOME_PROCESSED"
26851   has_colon=`$ECHO $path | $GREP ^.:`
26852   new_path="$path"
26853   if test "x$has_colon" = x; then
26854     # Not in mixed or Windows style, start by that.
26855     new_path=`cmd //c echo $path`
26856   fi
26857 
26858 
26859   input_path="$new_path"
26860   # Check if we need to convert this using DOS-style short mode. If the path
26861   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26862   # take no chances and rewrite it.
26863   # Note: m4 eats our [], so we need to use [ and ] instead.
26864   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26865   if test "x$has_forbidden_chars" != x; then
26866     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26867     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26868   fi
26869 
26870 
26871   windows_path="$new_path"
26872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26873     unix_path=`$CYGPATH -u "$windows_path"`
26874     new_path="$unix_path"
26875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26876     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26877     new_path="$unix_path"
26878   fi
26879 
26880   if test "x$path" != "x$new_path"; then
26881     JAVA_HOME_PROCESSED="$new_path"
26882     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26883 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26884   fi
26885 
26886   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26887   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26888 
26889     else
26890       # We're on a unix platform. Hooray! :)
26891       path="$JAVA_HOME_PROCESSED"
26892       has_space=`$ECHO "$path" | $GREP " "`
26893       if test "x$has_space" != x; then
26894         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26895 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26896         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26897       fi
26898 
26899       # Use eval to expand a potential ~
26900       eval path="$path"
26901       if test ! -f "$path" && test ! -d "$path"; then
26902         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26903       fi
26904 
26905       if test -d "$path"; then
26906         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26907       else
26908         dir="`$DIRNAME "$path"`"
26909         base="`$BASENAME "$path"`"
26910         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26911       fi
26912     fi
26913   fi
26914 
26915     if test ! -d "$JAVA_HOME_PROCESSED"; then
26916       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26917 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26918     else
26919       # Aha, the user has set a JAVA_HOME
26920       # let us use that as the Boot JDK.
26921       BOOT_JDK="$JAVA_HOME_PROCESSED"
26922       BOOT_JDK_FOUND=maybe
26923       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26924 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26925     fi
26926   fi
26927 
26928 
26929     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26930     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26931       # Do we have a bin/java?
26932       if test ! -x "$BOOT_JDK/bin/java"; then
26933         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26934 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26935         BOOT_JDK_FOUND=no
26936       else
26937         # Do we have a bin/javac?
26938         if test ! -x "$BOOT_JDK/bin/javac"; then
26939           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26940 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26941           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26942 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26943           BOOT_JDK_FOUND=no
26944         else
26945           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26946           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26947 
26948           # Extra M4 quote needed to protect [] in grep expression.
26949           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
26950           if test "x$FOUND_CORRECT_VERSION" = x; then
26951             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26952 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26953             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
26954 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
26955             BOOT_JDK_FOUND=no
26956           else
26957             # We're done! :-)
26958             BOOT_JDK_FOUND=yes
26959 
26960   # Only process if variable expands to non-empty
26961 
26962   if test "x$BOOT_JDK" != x; then
26963     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26964 
26965   # Input might be given as Windows format, start by converting to
26966   # unix format.
26967   path="$BOOT_JDK"
26968   new_path=`$CYGPATH -u "$path"`
26969 
26970   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26971   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26972   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26973   # "foo.exe" is OK but "foo" is an error.
26974   #
26975   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26976   # It is also a way to make sure we got the proper file name for the real test later on.
26977   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26978   if test "x$test_shortpath" = x; then
26979     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26980 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26981     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26982   fi
26983 
26984   # Call helper function which possibly converts this using DOS-style short mode.
26985   # If so, the updated path is stored in $new_path.
26986 
26987   input_path="$new_path"
26988   # Check if we need to convert this using DOS-style short mode. If the path
26989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26990   # take no chances and rewrite it.
26991   # Note: m4 eats our [], so we need to use [ and ] instead.
26992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26993   if test "x$has_forbidden_chars" != x; then
26994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26995     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26996     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26997     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26998       # Going to short mode and back again did indeed matter. Since short mode is
26999       # case insensitive, let's make it lowercase to improve readability.
27000       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27001       # Now convert it back to Unix-style (cygpath)
27002       input_path=`$CYGPATH -u "$shortmode_path"`
27003       new_path="$input_path"
27004     fi
27005   fi
27006 
27007   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27008   if test "x$test_cygdrive_prefix" = x; then
27009     # As a simple fix, exclude /usr/bin since it's not a real path.
27010     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27011       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27012       # a path prefixed by /cygdrive for fixpath to work.
27013       new_path="$CYGWIN_ROOT_PATH$input_path"
27014     fi
27015   fi
27016 
27017 
27018   if test "x$path" != "x$new_path"; then
27019     BOOT_JDK="$new_path"
27020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27021 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27022   fi
27023 
27024     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27025 
27026   path="$BOOT_JDK"
27027   has_colon=`$ECHO $path | $GREP ^.:`
27028   new_path="$path"
27029   if test "x$has_colon" = x; then
27030     # Not in mixed or Windows style, start by that.
27031     new_path=`cmd //c echo $path`
27032   fi
27033 
27034 
27035   input_path="$new_path"
27036   # Check if we need to convert this using DOS-style short mode. If the path
27037   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27038   # take no chances and rewrite it.
27039   # Note: m4 eats our [], so we need to use [ and ] instead.
27040   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27041   if test "x$has_forbidden_chars" != x; then
27042     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27043     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27044   fi
27045 
27046 
27047   windows_path="$new_path"
27048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27049     unix_path=`$CYGPATH -u "$windows_path"`
27050     new_path="$unix_path"
27051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27053     new_path="$unix_path"
27054   fi
27055 
27056   if test "x$path" != "x$new_path"; then
27057     BOOT_JDK="$new_path"
27058     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27059 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27060   fi
27061 
27062   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27063   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27064 
27065     else
27066       # We're on a unix platform. Hooray! :)
27067       path="$BOOT_JDK"
27068       has_space=`$ECHO "$path" | $GREP " "`
27069       if test "x$has_space" != x; then
27070         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27071 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27072         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27073       fi
27074 
27075       # Use eval to expand a potential ~
27076       eval path="$path"
27077       if test ! -f "$path" && test ! -d "$path"; then
27078         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27079       fi
27080 
27081       if test -d "$path"; then
27082         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27083       else
27084         dir="`$DIRNAME "$path"`"
27085         base="`$BASENAME "$path"`"
27086         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27087       fi
27088     fi
27089   fi
27090 
27091             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27092 $as_echo_n "checking for Boot JDK... " >&6; }
27093             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27094 $as_echo "$BOOT_JDK" >&6; }
27095             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27096 $as_echo_n "checking Boot JDK version... " >&6; }
27097             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27098             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27099 $as_echo "$BOOT_JDK_VERSION" >&6; }
27100           fi # end check jdk version
27101         fi # end check javac
27102       fi # end check java
27103     fi # end check boot jdk found
27104   fi
27105 
27106 
27107   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27108 
27109   if test "x$BOOT_JDK_FOUND" = xno; then
27110     # Now execute the test
27111 
27112   # Extract the first word of "javac", so it can be a program name with args.
27113 set dummy javac; ac_word=$2
27114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27115 $as_echo_n "checking for $ac_word... " >&6; }
27116 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27117   $as_echo_n "(cached) " >&6
27118 else
27119   case $JAVAC_CHECK in
27120   [\\/]* | ?:[\\/]*)
27121   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27122   ;;
27123   *)
27124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27125 for as_dir in $PATH
27126 do
27127   IFS=$as_save_IFS
27128   test -z "$as_dir" && as_dir=.
27129     for ac_exec_ext in '' $ac_executable_extensions; do
27130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27131     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27133     break 2
27134   fi
27135 done
27136   done
27137 IFS=$as_save_IFS
27138 
27139   ;;
27140 esac
27141 fi
27142 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27143 if test -n "$JAVAC_CHECK"; then
27144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27145 $as_echo "$JAVAC_CHECK" >&6; }
27146 else
27147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27148 $as_echo "no" >&6; }
27149 fi
27150 
27151 
27152   # Extract the first word of "java", so it can be a program name with args.
27153 set dummy java; ac_word=$2
27154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27155 $as_echo_n "checking for $ac_word... " >&6; }
27156 if ${ac_cv_path_JAVA_CHECK+:} false; then :
27157   $as_echo_n "(cached) " >&6
27158 else
27159   case $JAVA_CHECK in
27160   [\\/]* | ?:[\\/]*)
27161   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27162   ;;
27163   *)
27164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27165 for as_dir in $PATH
27166 do
27167   IFS=$as_save_IFS
27168   test -z "$as_dir" && as_dir=.
27169     for ac_exec_ext in '' $ac_executable_extensions; do
27170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27171     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27173     break 2
27174   fi
27175 done
27176   done
27177 IFS=$as_save_IFS
27178 
27179   ;;
27180 esac
27181 fi
27182 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27183 if test -n "$JAVA_CHECK"; then
27184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27185 $as_echo "$JAVA_CHECK" >&6; }
27186 else
27187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27188 $as_echo "no" >&6; }
27189 fi
27190 
27191 
27192   BINARY="$JAVAC_CHECK"
27193   if test "x$JAVAC_CHECK" = x; then
27194     BINARY="$JAVA_CHECK"
27195   fi
27196   if test "x$BINARY" != x; then
27197     # So there is a java(c) binary, it might be part of a JDK.
27198     # Lets find the JDK/JRE directory by following symbolic links.
27199     # Linux/GNU systems often have links from /usr/bin/java to
27200     # /etc/alternatives/java to the real JDK binary.
27201 
27202   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27203     # Follow a chain of symbolic links. Use readlink
27204     # where it exists, else fall back to horribly
27205     # complicated shell code.
27206     if test "x$READLINK_TESTED" != yes; then
27207       # On MacOSX there is a readlink tool with a different
27208       # purpose than the GNU readlink tool. Check the found readlink.
27209       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27210       if test "x$ISGNU" = x; then
27211         # A readlink that we do not know how to use.
27212         # Are there other non-GNU readlinks out there?
27213         READLINK_TESTED=yes
27214         READLINK=
27215       fi
27216     fi
27217 
27218     if test "x$READLINK" != x; then
27219       BINARY=`$READLINK -f $BINARY`
27220     else
27221       # Save the current directory for restoring afterwards
27222       STARTDIR=$PWD
27223       COUNTER=0
27224       sym_link_dir=`$DIRNAME $BINARY`
27225       sym_link_file=`$BASENAME $BINARY`
27226       cd $sym_link_dir
27227       # Use -P flag to resolve symlinks in directories.
27228       cd `$THEPWDCMD -P`
27229       sym_link_dir=`$THEPWDCMD -P`
27230       # Resolve file symlinks
27231       while test $COUNTER -lt 20; do
27232         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27233         if test "x$ISLINK" == x; then
27234           # This is not a symbolic link! We are done!
27235           break
27236         fi
27237         # Again resolve directory symlinks since the target of the just found
27238         # link could be in a different directory
27239         cd `$DIRNAME $ISLINK`
27240         sym_link_dir=`$THEPWDCMD -P`
27241         sym_link_file=`$BASENAME $ISLINK`
27242         let COUNTER=COUNTER+1
27243       done
27244       cd $STARTDIR
27245       BINARY=$sym_link_dir/$sym_link_file
27246     fi
27247   fi
27248 
27249     BOOT_JDK=`dirname "$BINARY"`
27250     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27251     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27252       # Looks like we found ourselves an JDK
27253       BOOT_JDK_FOUND=maybe
27254       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27255 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27256     fi
27257   fi
27258 
27259 
27260     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27261     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27262       # Do we have a bin/java?
27263       if test ! -x "$BOOT_JDK/bin/java"; then
27264         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27265 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27266         BOOT_JDK_FOUND=no
27267       else
27268         # Do we have a bin/javac?
27269         if test ! -x "$BOOT_JDK/bin/javac"; then
27270           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27272           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27273 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27274           BOOT_JDK_FOUND=no
27275         else
27276           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27277           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27278 
27279           # Extra M4 quote needed to protect [] in grep expression.
27280           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
27281           if test "x$FOUND_CORRECT_VERSION" = x; then
27282             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27283 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27284             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
27285 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
27286             BOOT_JDK_FOUND=no
27287           else
27288             # We're done! :-)
27289             BOOT_JDK_FOUND=yes
27290 
27291   # Only process if variable expands to non-empty
27292 
27293   if test "x$BOOT_JDK" != x; then
27294     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27295 
27296   # Input might be given as Windows format, start by converting to
27297   # unix format.
27298   path="$BOOT_JDK"
27299   new_path=`$CYGPATH -u "$path"`
27300 
27301   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27302   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27303   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27304   # "foo.exe" is OK but "foo" is an error.
27305   #
27306   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27307   # It is also a way to make sure we got the proper file name for the real test later on.
27308   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27309   if test "x$test_shortpath" = x; then
27310     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27311 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27312     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27313   fi
27314 
27315   # Call helper function which possibly converts this using DOS-style short mode.
27316   # If so, the updated path is stored in $new_path.
27317 
27318   input_path="$new_path"
27319   # Check if we need to convert this using DOS-style short mode. If the path
27320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27321   # take no chances and rewrite it.
27322   # Note: m4 eats our [], so we need to use [ and ] instead.
27323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27324   if test "x$has_forbidden_chars" != x; then
27325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27326     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27327     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27328     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27329       # Going to short mode and back again did indeed matter. Since short mode is
27330       # case insensitive, let's make it lowercase to improve readability.
27331       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27332       # Now convert it back to Unix-style (cygpath)
27333       input_path=`$CYGPATH -u "$shortmode_path"`
27334       new_path="$input_path"
27335     fi
27336   fi
27337 
27338   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27339   if test "x$test_cygdrive_prefix" = x; then
27340     # As a simple fix, exclude /usr/bin since it's not a real path.
27341     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27342       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27343       # a path prefixed by /cygdrive for fixpath to work.
27344       new_path="$CYGWIN_ROOT_PATH$input_path"
27345     fi
27346   fi
27347 
27348 
27349   if test "x$path" != "x$new_path"; then
27350     BOOT_JDK="$new_path"
27351     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27352 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27353   fi
27354 
27355     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27356 
27357   path="$BOOT_JDK"
27358   has_colon=`$ECHO $path | $GREP ^.:`
27359   new_path="$path"
27360   if test "x$has_colon" = x; then
27361     # Not in mixed or Windows style, start by that.
27362     new_path=`cmd //c echo $path`
27363   fi
27364 
27365 
27366   input_path="$new_path"
27367   # Check if we need to convert this using DOS-style short mode. If the path
27368   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27369   # take no chances and rewrite it.
27370   # Note: m4 eats our [], so we need to use [ and ] instead.
27371   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27372   if test "x$has_forbidden_chars" != x; then
27373     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27374     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27375   fi
27376 
27377 
27378   windows_path="$new_path"
27379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27380     unix_path=`$CYGPATH -u "$windows_path"`
27381     new_path="$unix_path"
27382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27384     new_path="$unix_path"
27385   fi
27386 
27387   if test "x$path" != "x$new_path"; then
27388     BOOT_JDK="$new_path"
27389     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27390 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27391   fi
27392 
27393   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27394   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27395 
27396     else
27397       # We're on a unix platform. Hooray! :)
27398       path="$BOOT_JDK"
27399       has_space=`$ECHO "$path" | $GREP " "`
27400       if test "x$has_space" != x; then
27401         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27402 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27403         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27404       fi
27405 
27406       # Use eval to expand a potential ~
27407       eval path="$path"
27408       if test ! -f "$path" && test ! -d "$path"; then
27409         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27410       fi
27411 
27412       if test -d "$path"; then
27413         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27414       else
27415         dir="`$DIRNAME "$path"`"
27416         base="`$BASENAME "$path"`"
27417         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27418       fi
27419     fi
27420   fi
27421 
27422             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27423 $as_echo_n "checking for Boot JDK... " >&6; }
27424             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27425 $as_echo "$BOOT_JDK" >&6; }
27426             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27427 $as_echo_n "checking Boot JDK version... " >&6; }
27428             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27429             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27430 $as_echo "$BOOT_JDK_VERSION" >&6; }
27431           fi # end check jdk version
27432         fi # end check javac
27433       fi # end check java
27434     fi # end check boot jdk found
27435   fi
27436 
27437 
27438   # Test: Is there a JDK installed in default, well-known locations?
27439 
27440   if test "x$BOOT_JDK_FOUND" = xno; then
27441     # Now execute the test
27442 
27443   if test "x$OPENJDK_TARGET_OS" = xwindows; then
27444 
27445   if test "x$BOOT_JDK_FOUND" = xno; then
27446     # Now execute the test
27447 
27448   if test "x$ProgramW6432" != x; then
27449     VIRTUAL_DIR="$ProgramW6432/Java"
27450 
27451   windows_path="$VIRTUAL_DIR"
27452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27453     unix_path=`$CYGPATH -u "$windows_path"`
27454     VIRTUAL_DIR="$unix_path"
27455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27457     VIRTUAL_DIR="$unix_path"
27458   fi
27459 
27460 
27461   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27462   BOOT_JDK_SUFFIX=""
27463   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27464   if test "x$ALL_JDKS_FOUND" != x; then
27465     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27466 
27467   if test "x$BOOT_JDK_FOUND" = xno; then
27468     # Now execute the test
27469 
27470         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27471         if test -d "$BOOT_JDK"; then
27472           BOOT_JDK_FOUND=maybe
27473           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27474 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27475         fi
27476 
27477 
27478     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27479     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27480       # Do we have a bin/java?
27481       if test ! -x "$BOOT_JDK/bin/java"; then
27482         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27483 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27484         BOOT_JDK_FOUND=no
27485       else
27486         # Do we have a bin/javac?
27487         if test ! -x "$BOOT_JDK/bin/javac"; then
27488           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27489 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27490           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27491 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27492           BOOT_JDK_FOUND=no
27493         else
27494           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27495           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27496 
27497           # Extra M4 quote needed to protect [] in grep expression.
27498           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
27499           if test "x$FOUND_CORRECT_VERSION" = x; then
27500             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27501 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27502             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
27503 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
27504             BOOT_JDK_FOUND=no
27505           else
27506             # We're done! :-)
27507             BOOT_JDK_FOUND=yes
27508 
27509   # Only process if variable expands to non-empty
27510 
27511   if test "x$BOOT_JDK" != x; then
27512     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27513 
27514   # Input might be given as Windows format, start by converting to
27515   # unix format.
27516   path="$BOOT_JDK"
27517   new_path=`$CYGPATH -u "$path"`
27518 
27519   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27520   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27521   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27522   # "foo.exe" is OK but "foo" is an error.
27523   #
27524   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27525   # It is also a way to make sure we got the proper file name for the real test later on.
27526   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27527   if test "x$test_shortpath" = x; then
27528     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27529 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27530     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27531   fi
27532 
27533   # Call helper function which possibly converts this using DOS-style short mode.
27534   # If so, the updated path is stored in $new_path.
27535 
27536   input_path="$new_path"
27537   # Check if we need to convert this using DOS-style short mode. If the path
27538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27539   # take no chances and rewrite it.
27540   # Note: m4 eats our [], so we need to use [ and ] instead.
27541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27542   if test "x$has_forbidden_chars" != x; then
27543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27544     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27545     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27546     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27547       # Going to short mode and back again did indeed matter. Since short mode is
27548       # case insensitive, let's make it lowercase to improve readability.
27549       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27550       # Now convert it back to Unix-style (cygpath)
27551       input_path=`$CYGPATH -u "$shortmode_path"`
27552       new_path="$input_path"
27553     fi
27554   fi
27555 
27556   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27557   if test "x$test_cygdrive_prefix" = x; then
27558     # As a simple fix, exclude /usr/bin since it's not a real path.
27559     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27560       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27561       # a path prefixed by /cygdrive for fixpath to work.
27562       new_path="$CYGWIN_ROOT_PATH$input_path"
27563     fi
27564   fi
27565 
27566 
27567   if test "x$path" != "x$new_path"; then
27568     BOOT_JDK="$new_path"
27569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27570 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27571   fi
27572 
27573     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27574 
27575   path="$BOOT_JDK"
27576   has_colon=`$ECHO $path | $GREP ^.:`
27577   new_path="$path"
27578   if test "x$has_colon" = x; then
27579     # Not in mixed or Windows style, start by that.
27580     new_path=`cmd //c echo $path`
27581   fi
27582 
27583 
27584   input_path="$new_path"
27585   # Check if we need to convert this using DOS-style short mode. If the path
27586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27587   # take no chances and rewrite it.
27588   # Note: m4 eats our [], so we need to use [ and ] instead.
27589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27590   if test "x$has_forbidden_chars" != x; then
27591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27592     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27593   fi
27594 
27595 
27596   windows_path="$new_path"
27597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27598     unix_path=`$CYGPATH -u "$windows_path"`
27599     new_path="$unix_path"
27600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27602     new_path="$unix_path"
27603   fi
27604 
27605   if test "x$path" != "x$new_path"; then
27606     BOOT_JDK="$new_path"
27607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27608 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27609   fi
27610 
27611   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27612   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27613 
27614     else
27615       # We're on a unix platform. Hooray! :)
27616       path="$BOOT_JDK"
27617       has_space=`$ECHO "$path" | $GREP " "`
27618       if test "x$has_space" != x; then
27619         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27620 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27621         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27622       fi
27623 
27624       # Use eval to expand a potential ~
27625       eval path="$path"
27626       if test ! -f "$path" && test ! -d "$path"; then
27627         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27628       fi
27629 
27630       if test -d "$path"; then
27631         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27632       else
27633         dir="`$DIRNAME "$path"`"
27634         base="`$BASENAME "$path"`"
27635         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27636       fi
27637     fi
27638   fi
27639 
27640             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27641 $as_echo_n "checking for Boot JDK... " >&6; }
27642             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27643 $as_echo "$BOOT_JDK" >&6; }
27644             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27645 $as_echo_n "checking Boot JDK version... " >&6; }
27646             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27647             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27648 $as_echo "$BOOT_JDK_VERSION" >&6; }
27649           fi # end check jdk version
27650         fi # end check javac
27651       fi # end check java
27652     fi # end check boot jdk found
27653   fi
27654 
27655     done
27656   fi
27657 
27658   fi
27659 
27660 
27661     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27662     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27663       # Do we have a bin/java?
27664       if test ! -x "$BOOT_JDK/bin/java"; then
27665         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27666 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27667         BOOT_JDK_FOUND=no
27668       else
27669         # Do we have a bin/javac?
27670         if test ! -x "$BOOT_JDK/bin/javac"; then
27671           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27672 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27673           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27674 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27675           BOOT_JDK_FOUND=no
27676         else
27677           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27678           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27679 
27680           # Extra M4 quote needed to protect [] in grep expression.
27681           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
27682           if test "x$FOUND_CORRECT_VERSION" = x; then
27683             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27684 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27685             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
27686 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
27687             BOOT_JDK_FOUND=no
27688           else
27689             # We're done! :-)
27690             BOOT_JDK_FOUND=yes
27691 
27692   # Only process if variable expands to non-empty
27693 
27694   if test "x$BOOT_JDK" != x; then
27695     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27696 
27697   # Input might be given as Windows format, start by converting to
27698   # unix format.
27699   path="$BOOT_JDK"
27700   new_path=`$CYGPATH -u "$path"`
27701 
27702   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27703   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27704   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27705   # "foo.exe" is OK but "foo" is an error.
27706   #
27707   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27708   # It is also a way to make sure we got the proper file name for the real test later on.
27709   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27710   if test "x$test_shortpath" = x; then
27711     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27712 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27713     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27714   fi
27715 
27716   # Call helper function which possibly converts this using DOS-style short mode.
27717   # If so, the updated path is stored in $new_path.
27718 
27719   input_path="$new_path"
27720   # Check if we need to convert this using DOS-style short mode. If the path
27721   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27722   # take no chances and rewrite it.
27723   # Note: m4 eats our [], so we need to use [ and ] instead.
27724   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27725   if test "x$has_forbidden_chars" != x; then
27726     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27727     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27728     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27729     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27730       # Going to short mode and back again did indeed matter. Since short mode is
27731       # case insensitive, let's make it lowercase to improve readability.
27732       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27733       # Now convert it back to Unix-style (cygpath)
27734       input_path=`$CYGPATH -u "$shortmode_path"`
27735       new_path="$input_path"
27736     fi
27737   fi
27738 
27739   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27740   if test "x$test_cygdrive_prefix" = x; then
27741     # As a simple fix, exclude /usr/bin since it's not a real path.
27742     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27743       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27744       # a path prefixed by /cygdrive for fixpath to work.
27745       new_path="$CYGWIN_ROOT_PATH$input_path"
27746     fi
27747   fi
27748 
27749 
27750   if test "x$path" != "x$new_path"; then
27751     BOOT_JDK="$new_path"
27752     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27753 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27754   fi
27755 
27756     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27757 
27758   path="$BOOT_JDK"
27759   has_colon=`$ECHO $path | $GREP ^.:`
27760   new_path="$path"
27761   if test "x$has_colon" = x; then
27762     # Not in mixed or Windows style, start by that.
27763     new_path=`cmd //c echo $path`
27764   fi
27765 
27766 
27767   input_path="$new_path"
27768   # Check if we need to convert this using DOS-style short mode. If the path
27769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27770   # take no chances and rewrite it.
27771   # Note: m4 eats our [], so we need to use [ and ] instead.
27772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27773   if test "x$has_forbidden_chars" != x; then
27774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27775     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27776   fi
27777 
27778 
27779   windows_path="$new_path"
27780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27781     unix_path=`$CYGPATH -u "$windows_path"`
27782     new_path="$unix_path"
27783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27784     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27785     new_path="$unix_path"
27786   fi
27787 
27788   if test "x$path" != "x$new_path"; then
27789     BOOT_JDK="$new_path"
27790     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27791 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27792   fi
27793 
27794   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27795   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27796 
27797     else
27798       # We're on a unix platform. Hooray! :)
27799       path="$BOOT_JDK"
27800       has_space=`$ECHO "$path" | $GREP " "`
27801       if test "x$has_space" != x; then
27802         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27803 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27804         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27805       fi
27806 
27807       # Use eval to expand a potential ~
27808       eval path="$path"
27809       if test ! -f "$path" && test ! -d "$path"; then
27810         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27811       fi
27812 
27813       if test -d "$path"; then
27814         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27815       else
27816         dir="`$DIRNAME "$path"`"
27817         base="`$BASENAME "$path"`"
27818         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27819       fi
27820     fi
27821   fi
27822 
27823             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27824 $as_echo_n "checking for Boot JDK... " >&6; }
27825             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27826 $as_echo "$BOOT_JDK" >&6; }
27827             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27828 $as_echo_n "checking Boot JDK version... " >&6; }
27829             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27830             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27831 $as_echo "$BOOT_JDK_VERSION" >&6; }
27832           fi # end check jdk version
27833         fi # end check javac
27834       fi # end check java
27835     fi # end check boot jdk found
27836   fi
27837 
27838 
27839   if test "x$BOOT_JDK_FOUND" = xno; then
27840     # Now execute the test
27841 
27842   if test "x$PROGRAMW6432" != x; then
27843     VIRTUAL_DIR="$PROGRAMW6432/Java"
27844 
27845   windows_path="$VIRTUAL_DIR"
27846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27847     unix_path=`$CYGPATH -u "$windows_path"`
27848     VIRTUAL_DIR="$unix_path"
27849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27851     VIRTUAL_DIR="$unix_path"
27852   fi
27853 
27854 
27855   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27856   BOOT_JDK_SUFFIX=""
27857   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27858   if test "x$ALL_JDKS_FOUND" != x; then
27859     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27860 
27861   if test "x$BOOT_JDK_FOUND" = xno; then
27862     # Now execute the test
27863 
27864         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27865         if test -d "$BOOT_JDK"; then
27866           BOOT_JDK_FOUND=maybe
27867           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27868 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27869         fi
27870 
27871 
27872     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27873     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27874       # Do we have a bin/java?
27875       if test ! -x "$BOOT_JDK/bin/java"; then
27876         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27877 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27878         BOOT_JDK_FOUND=no
27879       else
27880         # Do we have a bin/javac?
27881         if test ! -x "$BOOT_JDK/bin/javac"; then
27882           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27883 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27884           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27885 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27886           BOOT_JDK_FOUND=no
27887         else
27888           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27889           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27890 
27891           # Extra M4 quote needed to protect [] in grep expression.
27892           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
27893           if test "x$FOUND_CORRECT_VERSION" = x; then
27894             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27895 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27896             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
27897 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
27898             BOOT_JDK_FOUND=no
27899           else
27900             # We're done! :-)
27901             BOOT_JDK_FOUND=yes
27902 
27903   # Only process if variable expands to non-empty
27904 
27905   if test "x$BOOT_JDK" != x; then
27906     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27907 
27908   # Input might be given as Windows format, start by converting to
27909   # unix format.
27910   path="$BOOT_JDK"
27911   new_path=`$CYGPATH -u "$path"`
27912 
27913   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27914   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27915   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27916   # "foo.exe" is OK but "foo" is an error.
27917   #
27918   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27919   # It is also a way to make sure we got the proper file name for the real test later on.
27920   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27921   if test "x$test_shortpath" = x; then
27922     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27923 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27924     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27925   fi
27926 
27927   # Call helper function which possibly converts this using DOS-style short mode.
27928   # If so, the updated path is stored in $new_path.
27929 
27930   input_path="$new_path"
27931   # Check if we need to convert this using DOS-style short mode. If the path
27932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27933   # take no chances and rewrite it.
27934   # Note: m4 eats our [], so we need to use [ and ] instead.
27935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27936   if test "x$has_forbidden_chars" != x; then
27937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27938     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27939     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27940     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27941       # Going to short mode and back again did indeed matter. Since short mode is
27942       # case insensitive, let's make it lowercase to improve readability.
27943       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27944       # Now convert it back to Unix-style (cygpath)
27945       input_path=`$CYGPATH -u "$shortmode_path"`
27946       new_path="$input_path"
27947     fi
27948   fi
27949 
27950   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27951   if test "x$test_cygdrive_prefix" = x; then
27952     # As a simple fix, exclude /usr/bin since it's not a real path.
27953     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27954       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27955       # a path prefixed by /cygdrive for fixpath to work.
27956       new_path="$CYGWIN_ROOT_PATH$input_path"
27957     fi
27958   fi
27959 
27960 
27961   if test "x$path" != "x$new_path"; then
27962     BOOT_JDK="$new_path"
27963     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27964 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27965   fi
27966 
27967     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27968 
27969   path="$BOOT_JDK"
27970   has_colon=`$ECHO $path | $GREP ^.:`
27971   new_path="$path"
27972   if test "x$has_colon" = x; then
27973     # Not in mixed or Windows style, start by that.
27974     new_path=`cmd //c echo $path`
27975   fi
27976 
27977 
27978   input_path="$new_path"
27979   # Check if we need to convert this using DOS-style short mode. If the path
27980   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27981   # take no chances and rewrite it.
27982   # Note: m4 eats our [], so we need to use [ and ] instead.
27983   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27984   if test "x$has_forbidden_chars" != x; then
27985     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27986     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27987   fi
27988 
27989 
27990   windows_path="$new_path"
27991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27992     unix_path=`$CYGPATH -u "$windows_path"`
27993     new_path="$unix_path"
27994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27995     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27996     new_path="$unix_path"
27997   fi
27998 
27999   if test "x$path" != "x$new_path"; then
28000     BOOT_JDK="$new_path"
28001     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28002 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28003   fi
28004 
28005   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28006   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28007 
28008     else
28009       # We're on a unix platform. Hooray! :)
28010       path="$BOOT_JDK"
28011       has_space=`$ECHO "$path" | $GREP " "`
28012       if test "x$has_space" != x; then
28013         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28014 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28015         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28016       fi
28017 
28018       # Use eval to expand a potential ~
28019       eval path="$path"
28020       if test ! -f "$path" && test ! -d "$path"; then
28021         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28022       fi
28023 
28024       if test -d "$path"; then
28025         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28026       else
28027         dir="`$DIRNAME "$path"`"
28028         base="`$BASENAME "$path"`"
28029         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28030       fi
28031     fi
28032   fi
28033 
28034             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28035 $as_echo_n "checking for Boot JDK... " >&6; }
28036             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28037 $as_echo "$BOOT_JDK" >&6; }
28038             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28039 $as_echo_n "checking Boot JDK version... " >&6; }
28040             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28041             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28042 $as_echo "$BOOT_JDK_VERSION" >&6; }
28043           fi # end check jdk version
28044         fi # end check javac
28045       fi # end check java
28046     fi # end check boot jdk found
28047   fi
28048 
28049     done
28050   fi
28051 
28052   fi
28053 
28054 
28055     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28056     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28057       # Do we have a bin/java?
28058       if test ! -x "$BOOT_JDK/bin/java"; then
28059         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28060 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28061         BOOT_JDK_FOUND=no
28062       else
28063         # Do we have a bin/javac?
28064         if test ! -x "$BOOT_JDK/bin/javac"; then
28065           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28066 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28067           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28068 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28069           BOOT_JDK_FOUND=no
28070         else
28071           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28072           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28073 
28074           # Extra M4 quote needed to protect [] in grep expression.
28075           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
28076           if test "x$FOUND_CORRECT_VERSION" = x; then
28077             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28079             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
28080 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
28081             BOOT_JDK_FOUND=no
28082           else
28083             # We're done! :-)
28084             BOOT_JDK_FOUND=yes
28085 
28086   # Only process if variable expands to non-empty
28087 
28088   if test "x$BOOT_JDK" != x; then
28089     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28090 
28091   # Input might be given as Windows format, start by converting to
28092   # unix format.
28093   path="$BOOT_JDK"
28094   new_path=`$CYGPATH -u "$path"`
28095 
28096   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28097   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28098   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28099   # "foo.exe" is OK but "foo" is an error.
28100   #
28101   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28102   # It is also a way to make sure we got the proper file name for the real test later on.
28103   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28104   if test "x$test_shortpath" = x; then
28105     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28106 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28107     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28108   fi
28109 
28110   # Call helper function which possibly converts this using DOS-style short mode.
28111   # If so, the updated path is stored in $new_path.
28112 
28113   input_path="$new_path"
28114   # Check if we need to convert this using DOS-style short mode. If the path
28115   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28116   # take no chances and rewrite it.
28117   # Note: m4 eats our [], so we need to use [ and ] instead.
28118   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28119   if test "x$has_forbidden_chars" != x; then
28120     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28121     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28122     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28123     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28124       # Going to short mode and back again did indeed matter. Since short mode is
28125       # case insensitive, let's make it lowercase to improve readability.
28126       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28127       # Now convert it back to Unix-style (cygpath)
28128       input_path=`$CYGPATH -u "$shortmode_path"`
28129       new_path="$input_path"
28130     fi
28131   fi
28132 
28133   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28134   if test "x$test_cygdrive_prefix" = x; then
28135     # As a simple fix, exclude /usr/bin since it's not a real path.
28136     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28137       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28138       # a path prefixed by /cygdrive for fixpath to work.
28139       new_path="$CYGWIN_ROOT_PATH$input_path"
28140     fi
28141   fi
28142 
28143 
28144   if test "x$path" != "x$new_path"; then
28145     BOOT_JDK="$new_path"
28146     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28147 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28148   fi
28149 
28150     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28151 
28152   path="$BOOT_JDK"
28153   has_colon=`$ECHO $path | $GREP ^.:`
28154   new_path="$path"
28155   if test "x$has_colon" = x; then
28156     # Not in mixed or Windows style, start by that.
28157     new_path=`cmd //c echo $path`
28158   fi
28159 
28160 
28161   input_path="$new_path"
28162   # Check if we need to convert this using DOS-style short mode. If the path
28163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28164   # take no chances and rewrite it.
28165   # Note: m4 eats our [], so we need to use [ and ] instead.
28166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28167   if test "x$has_forbidden_chars" != x; then
28168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28169     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28170   fi
28171 
28172 
28173   windows_path="$new_path"
28174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28175     unix_path=`$CYGPATH -u "$windows_path"`
28176     new_path="$unix_path"
28177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28179     new_path="$unix_path"
28180   fi
28181 
28182   if test "x$path" != "x$new_path"; then
28183     BOOT_JDK="$new_path"
28184     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28185 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28186   fi
28187 
28188   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28189   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28190 
28191     else
28192       # We're on a unix platform. Hooray! :)
28193       path="$BOOT_JDK"
28194       has_space=`$ECHO "$path" | $GREP " "`
28195       if test "x$has_space" != x; then
28196         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28197 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28198         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28199       fi
28200 
28201       # Use eval to expand a potential ~
28202       eval path="$path"
28203       if test ! -f "$path" && test ! -d "$path"; then
28204         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28205       fi
28206 
28207       if test -d "$path"; then
28208         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28209       else
28210         dir="`$DIRNAME "$path"`"
28211         base="`$BASENAME "$path"`"
28212         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28213       fi
28214     fi
28215   fi
28216 
28217             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28218 $as_echo_n "checking for Boot JDK... " >&6; }
28219             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28220 $as_echo "$BOOT_JDK" >&6; }
28221             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28222 $as_echo_n "checking Boot JDK version... " >&6; }
28223             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28224             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28225 $as_echo "$BOOT_JDK_VERSION" >&6; }
28226           fi # end check jdk version
28227         fi # end check javac
28228       fi # end check java
28229     fi # end check boot jdk found
28230   fi
28231 
28232 
28233   if test "x$BOOT_JDK_FOUND" = xno; then
28234     # Now execute the test
28235 
28236   if test "x$PROGRAMFILES" != x; then
28237     VIRTUAL_DIR="$PROGRAMFILES/Java"
28238 
28239   windows_path="$VIRTUAL_DIR"
28240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28241     unix_path=`$CYGPATH -u "$windows_path"`
28242     VIRTUAL_DIR="$unix_path"
28243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28244     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28245     VIRTUAL_DIR="$unix_path"
28246   fi
28247 
28248 
28249   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28250   BOOT_JDK_SUFFIX=""
28251   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28252   if test "x$ALL_JDKS_FOUND" != x; then
28253     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28254 
28255   if test "x$BOOT_JDK_FOUND" = xno; then
28256     # Now execute the test
28257 
28258         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28259         if test -d "$BOOT_JDK"; then
28260           BOOT_JDK_FOUND=maybe
28261           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28262 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28263         fi
28264 
28265 
28266     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28267     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28268       # Do we have a bin/java?
28269       if test ! -x "$BOOT_JDK/bin/java"; then
28270         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28272         BOOT_JDK_FOUND=no
28273       else
28274         # Do we have a bin/javac?
28275         if test ! -x "$BOOT_JDK/bin/javac"; then
28276           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28277 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28278           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28279 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28280           BOOT_JDK_FOUND=no
28281         else
28282           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28283           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28284 
28285           # Extra M4 quote needed to protect [] in grep expression.
28286           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
28287           if test "x$FOUND_CORRECT_VERSION" = x; then
28288             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28289 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28290             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
28291 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
28292             BOOT_JDK_FOUND=no
28293           else
28294             # We're done! :-)
28295             BOOT_JDK_FOUND=yes
28296 
28297   # Only process if variable expands to non-empty
28298 
28299   if test "x$BOOT_JDK" != x; then
28300     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28301 
28302   # Input might be given as Windows format, start by converting to
28303   # unix format.
28304   path="$BOOT_JDK"
28305   new_path=`$CYGPATH -u "$path"`
28306 
28307   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28308   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28309   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28310   # "foo.exe" is OK but "foo" is an error.
28311   #
28312   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28313   # It is also a way to make sure we got the proper file name for the real test later on.
28314   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28315   if test "x$test_shortpath" = x; then
28316     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28317 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28318     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28319   fi
28320 
28321   # Call helper function which possibly converts this using DOS-style short mode.
28322   # If so, the updated path is stored in $new_path.
28323 
28324   input_path="$new_path"
28325   # Check if we need to convert this using DOS-style short mode. If the path
28326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28327   # take no chances and rewrite it.
28328   # Note: m4 eats our [], so we need to use [ and ] instead.
28329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28330   if test "x$has_forbidden_chars" != x; then
28331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28332     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28333     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28334     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28335       # Going to short mode and back again did indeed matter. Since short mode is
28336       # case insensitive, let's make it lowercase to improve readability.
28337       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28338       # Now convert it back to Unix-style (cygpath)
28339       input_path=`$CYGPATH -u "$shortmode_path"`
28340       new_path="$input_path"
28341     fi
28342   fi
28343 
28344   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28345   if test "x$test_cygdrive_prefix" = x; then
28346     # As a simple fix, exclude /usr/bin since it's not a real path.
28347     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28348       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28349       # a path prefixed by /cygdrive for fixpath to work.
28350       new_path="$CYGWIN_ROOT_PATH$input_path"
28351     fi
28352   fi
28353 
28354 
28355   if test "x$path" != "x$new_path"; then
28356     BOOT_JDK="$new_path"
28357     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28358 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28359   fi
28360 
28361     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28362 
28363   path="$BOOT_JDK"
28364   has_colon=`$ECHO $path | $GREP ^.:`
28365   new_path="$path"
28366   if test "x$has_colon" = x; then
28367     # Not in mixed or Windows style, start by that.
28368     new_path=`cmd //c echo $path`
28369   fi
28370 
28371 
28372   input_path="$new_path"
28373   # Check if we need to convert this using DOS-style short mode. If the path
28374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28375   # take no chances and rewrite it.
28376   # Note: m4 eats our [], so we need to use [ and ] instead.
28377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28378   if test "x$has_forbidden_chars" != x; then
28379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28380     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28381   fi
28382 
28383 
28384   windows_path="$new_path"
28385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28386     unix_path=`$CYGPATH -u "$windows_path"`
28387     new_path="$unix_path"
28388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28390     new_path="$unix_path"
28391   fi
28392 
28393   if test "x$path" != "x$new_path"; then
28394     BOOT_JDK="$new_path"
28395     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28396 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28397   fi
28398 
28399   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28400   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28401 
28402     else
28403       # We're on a unix platform. Hooray! :)
28404       path="$BOOT_JDK"
28405       has_space=`$ECHO "$path" | $GREP " "`
28406       if test "x$has_space" != x; then
28407         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28408 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28409         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28410       fi
28411 
28412       # Use eval to expand a potential ~
28413       eval path="$path"
28414       if test ! -f "$path" && test ! -d "$path"; then
28415         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28416       fi
28417 
28418       if test -d "$path"; then
28419         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28420       else
28421         dir="`$DIRNAME "$path"`"
28422         base="`$BASENAME "$path"`"
28423         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28424       fi
28425     fi
28426   fi
28427 
28428             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28429 $as_echo_n "checking for Boot JDK... " >&6; }
28430             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28431 $as_echo "$BOOT_JDK" >&6; }
28432             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28433 $as_echo_n "checking Boot JDK version... " >&6; }
28434             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28435             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28436 $as_echo "$BOOT_JDK_VERSION" >&6; }
28437           fi # end check jdk version
28438         fi # end check javac
28439       fi # end check java
28440     fi # end check boot jdk found
28441   fi
28442 
28443     done
28444   fi
28445 
28446   fi
28447 
28448 
28449     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28450     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28451       # Do we have a bin/java?
28452       if test ! -x "$BOOT_JDK/bin/java"; then
28453         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28454 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28455         BOOT_JDK_FOUND=no
28456       else
28457         # Do we have a bin/javac?
28458         if test ! -x "$BOOT_JDK/bin/javac"; then
28459           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28460 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28461           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28462 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28463           BOOT_JDK_FOUND=no
28464         else
28465           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28466           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28467 
28468           # Extra M4 quote needed to protect [] in grep expression.
28469           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
28470           if test "x$FOUND_CORRECT_VERSION" = x; then
28471             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28472 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28473             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
28474 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
28475             BOOT_JDK_FOUND=no
28476           else
28477             # We're done! :-)
28478             BOOT_JDK_FOUND=yes
28479 
28480   # Only process if variable expands to non-empty
28481 
28482   if test "x$BOOT_JDK" != x; then
28483     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28484 
28485   # Input might be given as Windows format, start by converting to
28486   # unix format.
28487   path="$BOOT_JDK"
28488   new_path=`$CYGPATH -u "$path"`
28489 
28490   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28491   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28492   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28493   # "foo.exe" is OK but "foo" is an error.
28494   #
28495   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28496   # It is also a way to make sure we got the proper file name for the real test later on.
28497   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28498   if test "x$test_shortpath" = x; then
28499     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28500 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28501     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28502   fi
28503 
28504   # Call helper function which possibly converts this using DOS-style short mode.
28505   # If so, the updated path is stored in $new_path.
28506 
28507   input_path="$new_path"
28508   # Check if we need to convert this using DOS-style short mode. If the path
28509   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28510   # take no chances and rewrite it.
28511   # Note: m4 eats our [], so we need to use [ and ] instead.
28512   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28513   if test "x$has_forbidden_chars" != x; then
28514     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28515     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28516     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28517     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28518       # Going to short mode and back again did indeed matter. Since short mode is
28519       # case insensitive, let's make it lowercase to improve readability.
28520       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28521       # Now convert it back to Unix-style (cygpath)
28522       input_path=`$CYGPATH -u "$shortmode_path"`
28523       new_path="$input_path"
28524     fi
28525   fi
28526 
28527   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28528   if test "x$test_cygdrive_prefix" = x; then
28529     # As a simple fix, exclude /usr/bin since it's not a real path.
28530     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28531       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28532       # a path prefixed by /cygdrive for fixpath to work.
28533       new_path="$CYGWIN_ROOT_PATH$input_path"
28534     fi
28535   fi
28536 
28537 
28538   if test "x$path" != "x$new_path"; then
28539     BOOT_JDK="$new_path"
28540     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28541 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28542   fi
28543 
28544     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28545 
28546   path="$BOOT_JDK"
28547   has_colon=`$ECHO $path | $GREP ^.:`
28548   new_path="$path"
28549   if test "x$has_colon" = x; then
28550     # Not in mixed or Windows style, start by that.
28551     new_path=`cmd //c echo $path`
28552   fi
28553 
28554 
28555   input_path="$new_path"
28556   # Check if we need to convert this using DOS-style short mode. If the path
28557   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28558   # take no chances and rewrite it.
28559   # Note: m4 eats our [], so we need to use [ and ] instead.
28560   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28561   if test "x$has_forbidden_chars" != x; then
28562     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28563     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28564   fi
28565 
28566 
28567   windows_path="$new_path"
28568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28569     unix_path=`$CYGPATH -u "$windows_path"`
28570     new_path="$unix_path"
28571   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28572     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28573     new_path="$unix_path"
28574   fi
28575 
28576   if test "x$path" != "x$new_path"; then
28577     BOOT_JDK="$new_path"
28578     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28579 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28580   fi
28581 
28582   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28583   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28584 
28585     else
28586       # We're on a unix platform. Hooray! :)
28587       path="$BOOT_JDK"
28588       has_space=`$ECHO "$path" | $GREP " "`
28589       if test "x$has_space" != x; then
28590         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28591 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28592         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28593       fi
28594 
28595       # Use eval to expand a potential ~
28596       eval path="$path"
28597       if test ! -f "$path" && test ! -d "$path"; then
28598         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28599       fi
28600 
28601       if test -d "$path"; then
28602         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28603       else
28604         dir="`$DIRNAME "$path"`"
28605         base="`$BASENAME "$path"`"
28606         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28607       fi
28608     fi
28609   fi
28610 
28611             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28612 $as_echo_n "checking for Boot JDK... " >&6; }
28613             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28614 $as_echo "$BOOT_JDK" >&6; }
28615             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28616 $as_echo_n "checking Boot JDK version... " >&6; }
28617             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28618             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28619 $as_echo "$BOOT_JDK_VERSION" >&6; }
28620           fi # end check jdk version
28621         fi # end check javac
28622       fi # end check java
28623     fi # end check boot jdk found
28624   fi
28625 
28626 
28627   if test "x$BOOT_JDK_FOUND" = xno; then
28628     # Now execute the test
28629 
28630   if test "x$ProgramFiles" != x; then
28631     VIRTUAL_DIR="$ProgramFiles/Java"
28632 
28633   windows_path="$VIRTUAL_DIR"
28634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28635     unix_path=`$CYGPATH -u "$windows_path"`
28636     VIRTUAL_DIR="$unix_path"
28637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28639     VIRTUAL_DIR="$unix_path"
28640   fi
28641 
28642 
28643   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28644   BOOT_JDK_SUFFIX=""
28645   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28646   if test "x$ALL_JDKS_FOUND" != x; then
28647     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28648 
28649   if test "x$BOOT_JDK_FOUND" = xno; then
28650     # Now execute the test
28651 
28652         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28653         if test -d "$BOOT_JDK"; then
28654           BOOT_JDK_FOUND=maybe
28655           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28656 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28657         fi
28658 
28659 
28660     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28661     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28662       # Do we have a bin/java?
28663       if test ! -x "$BOOT_JDK/bin/java"; then
28664         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28665 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28666         BOOT_JDK_FOUND=no
28667       else
28668         # Do we have a bin/javac?
28669         if test ! -x "$BOOT_JDK/bin/javac"; then
28670           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28671 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28672           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28673 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28674           BOOT_JDK_FOUND=no
28675         else
28676           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28677           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28678 
28679           # Extra M4 quote needed to protect [] in grep expression.
28680           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
28681           if test "x$FOUND_CORRECT_VERSION" = x; then
28682             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28683 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28684             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
28685 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
28686             BOOT_JDK_FOUND=no
28687           else
28688             # We're done! :-)
28689             BOOT_JDK_FOUND=yes
28690 
28691   # Only process if variable expands to non-empty
28692 
28693   if test "x$BOOT_JDK" != x; then
28694     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28695 
28696   # Input might be given as Windows format, start by converting to
28697   # unix format.
28698   path="$BOOT_JDK"
28699   new_path=`$CYGPATH -u "$path"`
28700 
28701   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28702   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28703   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28704   # "foo.exe" is OK but "foo" is an error.
28705   #
28706   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28707   # It is also a way to make sure we got the proper file name for the real test later on.
28708   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28709   if test "x$test_shortpath" = x; then
28710     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28711 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28712     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28713   fi
28714 
28715   # Call helper function which possibly converts this using DOS-style short mode.
28716   # If so, the updated path is stored in $new_path.
28717 
28718   input_path="$new_path"
28719   # Check if we need to convert this using DOS-style short mode. If the path
28720   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28721   # take no chances and rewrite it.
28722   # Note: m4 eats our [], so we need to use [ and ] instead.
28723   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28724   if test "x$has_forbidden_chars" != x; then
28725     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28726     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28727     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28728     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28729       # Going to short mode and back again did indeed matter. Since short mode is
28730       # case insensitive, let's make it lowercase to improve readability.
28731       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28732       # Now convert it back to Unix-style (cygpath)
28733       input_path=`$CYGPATH -u "$shortmode_path"`
28734       new_path="$input_path"
28735     fi
28736   fi
28737 
28738   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28739   if test "x$test_cygdrive_prefix" = x; then
28740     # As a simple fix, exclude /usr/bin since it's not a real path.
28741     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28742       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28743       # a path prefixed by /cygdrive for fixpath to work.
28744       new_path="$CYGWIN_ROOT_PATH$input_path"
28745     fi
28746   fi
28747 
28748 
28749   if test "x$path" != "x$new_path"; then
28750     BOOT_JDK="$new_path"
28751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28752 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28753   fi
28754 
28755     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28756 
28757   path="$BOOT_JDK"
28758   has_colon=`$ECHO $path | $GREP ^.:`
28759   new_path="$path"
28760   if test "x$has_colon" = x; then
28761     # Not in mixed or Windows style, start by that.
28762     new_path=`cmd //c echo $path`
28763   fi
28764 
28765 
28766   input_path="$new_path"
28767   # Check if we need to convert this using DOS-style short mode. If the path
28768   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28769   # take no chances and rewrite it.
28770   # Note: m4 eats our [], so we need to use [ and ] instead.
28771   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28772   if test "x$has_forbidden_chars" != x; then
28773     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28774     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28775   fi
28776 
28777 
28778   windows_path="$new_path"
28779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28780     unix_path=`$CYGPATH -u "$windows_path"`
28781     new_path="$unix_path"
28782   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28783     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28784     new_path="$unix_path"
28785   fi
28786 
28787   if test "x$path" != "x$new_path"; then
28788     BOOT_JDK="$new_path"
28789     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28790 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28791   fi
28792 
28793   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28794   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28795 
28796     else
28797       # We're on a unix platform. Hooray! :)
28798       path="$BOOT_JDK"
28799       has_space=`$ECHO "$path" | $GREP " "`
28800       if test "x$has_space" != x; then
28801         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28802 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28803         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28804       fi
28805 
28806       # Use eval to expand a potential ~
28807       eval path="$path"
28808       if test ! -f "$path" && test ! -d "$path"; then
28809         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28810       fi
28811 
28812       if test -d "$path"; then
28813         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28814       else
28815         dir="`$DIRNAME "$path"`"
28816         base="`$BASENAME "$path"`"
28817         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28818       fi
28819     fi
28820   fi
28821 
28822             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28823 $as_echo_n "checking for Boot JDK... " >&6; }
28824             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28825 $as_echo "$BOOT_JDK" >&6; }
28826             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28827 $as_echo_n "checking Boot JDK version... " >&6; }
28828             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28829             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28830 $as_echo "$BOOT_JDK_VERSION" >&6; }
28831           fi # end check jdk version
28832         fi # end check javac
28833       fi # end check java
28834     fi # end check boot jdk found
28835   fi
28836 
28837     done
28838   fi
28839 
28840   fi
28841 
28842 
28843     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28844     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28845       # Do we have a bin/java?
28846       if test ! -x "$BOOT_JDK/bin/java"; then
28847         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28848 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28849         BOOT_JDK_FOUND=no
28850       else
28851         # Do we have a bin/javac?
28852         if test ! -x "$BOOT_JDK/bin/javac"; then
28853           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28854 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28855           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28856 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28857           BOOT_JDK_FOUND=no
28858         else
28859           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28860           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28861 
28862           # Extra M4 quote needed to protect [] in grep expression.
28863           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
28864           if test "x$FOUND_CORRECT_VERSION" = x; then
28865             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28866 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28867             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
28868 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
28869             BOOT_JDK_FOUND=no
28870           else
28871             # We're done! :-)
28872             BOOT_JDK_FOUND=yes
28873 
28874   # Only process if variable expands to non-empty
28875 
28876   if test "x$BOOT_JDK" != x; then
28877     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28878 
28879   # Input might be given as Windows format, start by converting to
28880   # unix format.
28881   path="$BOOT_JDK"
28882   new_path=`$CYGPATH -u "$path"`
28883 
28884   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28885   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28886   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28887   # "foo.exe" is OK but "foo" is an error.
28888   #
28889   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28890   # It is also a way to make sure we got the proper file name for the real test later on.
28891   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28892   if test "x$test_shortpath" = x; then
28893     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28894 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28895     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28896   fi
28897 
28898   # Call helper function which possibly converts this using DOS-style short mode.
28899   # If so, the updated path is stored in $new_path.
28900 
28901   input_path="$new_path"
28902   # Check if we need to convert this using DOS-style short mode. If the path
28903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28904   # take no chances and rewrite it.
28905   # Note: m4 eats our [], so we need to use [ and ] instead.
28906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28907   if test "x$has_forbidden_chars" != x; then
28908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28909     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28910     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28911     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28912       # Going to short mode and back again did indeed matter. Since short mode is
28913       # case insensitive, let's make it lowercase to improve readability.
28914       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28915       # Now convert it back to Unix-style (cygpath)
28916       input_path=`$CYGPATH -u "$shortmode_path"`
28917       new_path="$input_path"
28918     fi
28919   fi
28920 
28921   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28922   if test "x$test_cygdrive_prefix" = x; then
28923     # As a simple fix, exclude /usr/bin since it's not a real path.
28924     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28925       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28926       # a path prefixed by /cygdrive for fixpath to work.
28927       new_path="$CYGWIN_ROOT_PATH$input_path"
28928     fi
28929   fi
28930 
28931 
28932   if test "x$path" != "x$new_path"; then
28933     BOOT_JDK="$new_path"
28934     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28935 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28936   fi
28937 
28938     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28939 
28940   path="$BOOT_JDK"
28941   has_colon=`$ECHO $path | $GREP ^.:`
28942   new_path="$path"
28943   if test "x$has_colon" = x; then
28944     # Not in mixed or Windows style, start by that.
28945     new_path=`cmd //c echo $path`
28946   fi
28947 
28948 
28949   input_path="$new_path"
28950   # Check if we need to convert this using DOS-style short mode. If the path
28951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28952   # take no chances and rewrite it.
28953   # Note: m4 eats our [], so we need to use [ and ] instead.
28954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28955   if test "x$has_forbidden_chars" != x; then
28956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28957     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28958   fi
28959 
28960 
28961   windows_path="$new_path"
28962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28963     unix_path=`$CYGPATH -u "$windows_path"`
28964     new_path="$unix_path"
28965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28967     new_path="$unix_path"
28968   fi
28969 
28970   if test "x$path" != "x$new_path"; then
28971     BOOT_JDK="$new_path"
28972     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28973 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28974   fi
28975 
28976   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28977   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28978 
28979     else
28980       # We're on a unix platform. Hooray! :)
28981       path="$BOOT_JDK"
28982       has_space=`$ECHO "$path" | $GREP " "`
28983       if test "x$has_space" != x; then
28984         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28985 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28986         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28987       fi
28988 
28989       # Use eval to expand a potential ~
28990       eval path="$path"
28991       if test ! -f "$path" && test ! -d "$path"; then
28992         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28993       fi
28994 
28995       if test -d "$path"; then
28996         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28997       else
28998         dir="`$DIRNAME "$path"`"
28999         base="`$BASENAME "$path"`"
29000         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29001       fi
29002     fi
29003   fi
29004 
29005             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29006 $as_echo_n "checking for Boot JDK... " >&6; }
29007             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29008 $as_echo "$BOOT_JDK" >&6; }
29009             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29010 $as_echo_n "checking Boot JDK version... " >&6; }
29011             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29012             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29013 $as_echo "$BOOT_JDK_VERSION" >&6; }
29014           fi # end check jdk version
29015         fi # end check javac
29016       fi # end check java
29017     fi # end check boot jdk found
29018   fi
29019 
29020 
29021   if test "x$BOOT_JDK_FOUND" = xno; then
29022     # Now execute the test
29023 
29024   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
29025   BOOT_JDK_SUFFIX=""
29026   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29027   if test "x$ALL_JDKS_FOUND" != x; then
29028     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29029 
29030   if test "x$BOOT_JDK_FOUND" = xno; then
29031     # Now execute the test
29032 
29033         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29034         if test -d "$BOOT_JDK"; then
29035           BOOT_JDK_FOUND=maybe
29036           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29037 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29038         fi
29039 
29040 
29041     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29042     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29043       # Do we have a bin/java?
29044       if test ! -x "$BOOT_JDK/bin/java"; then
29045         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29046 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29047         BOOT_JDK_FOUND=no
29048       else
29049         # Do we have a bin/javac?
29050         if test ! -x "$BOOT_JDK/bin/javac"; then
29051           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29052 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29053           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29054 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29055           BOOT_JDK_FOUND=no
29056         else
29057           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29058           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29059 
29060           # Extra M4 quote needed to protect [] in grep expression.
29061           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
29062           if test "x$FOUND_CORRECT_VERSION" = x; then
29063             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29064 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29065             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
29066 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
29067             BOOT_JDK_FOUND=no
29068           else
29069             # We're done! :-)
29070             BOOT_JDK_FOUND=yes
29071 
29072   # Only process if variable expands to non-empty
29073 
29074   if test "x$BOOT_JDK" != x; then
29075     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29076 
29077   # Input might be given as Windows format, start by converting to
29078   # unix format.
29079   path="$BOOT_JDK"
29080   new_path=`$CYGPATH -u "$path"`
29081 
29082   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29083   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29084   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29085   # "foo.exe" is OK but "foo" is an error.
29086   #
29087   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29088   # It is also a way to make sure we got the proper file name for the real test later on.
29089   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29090   if test "x$test_shortpath" = x; then
29091     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29092 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29093     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29094   fi
29095 
29096   # Call helper function which possibly converts this using DOS-style short mode.
29097   # If so, the updated path is stored in $new_path.
29098 
29099   input_path="$new_path"
29100   # Check if we need to convert this using DOS-style short mode. If the path
29101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29102   # take no chances and rewrite it.
29103   # Note: m4 eats our [], so we need to use [ and ] instead.
29104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29105   if test "x$has_forbidden_chars" != x; then
29106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29107     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29108     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29109     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29110       # Going to short mode and back again did indeed matter. Since short mode is
29111       # case insensitive, let's make it lowercase to improve readability.
29112       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29113       # Now convert it back to Unix-style (cygpath)
29114       input_path=`$CYGPATH -u "$shortmode_path"`
29115       new_path="$input_path"
29116     fi
29117   fi
29118 
29119   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29120   if test "x$test_cygdrive_prefix" = x; then
29121     # As a simple fix, exclude /usr/bin since it's not a real path.
29122     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29123       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29124       # a path prefixed by /cygdrive for fixpath to work.
29125       new_path="$CYGWIN_ROOT_PATH$input_path"
29126     fi
29127   fi
29128 
29129 
29130   if test "x$path" != "x$new_path"; then
29131     BOOT_JDK="$new_path"
29132     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29133 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29134   fi
29135 
29136     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29137 
29138   path="$BOOT_JDK"
29139   has_colon=`$ECHO $path | $GREP ^.:`
29140   new_path="$path"
29141   if test "x$has_colon" = x; then
29142     # Not in mixed or Windows style, start by that.
29143     new_path=`cmd //c echo $path`
29144   fi
29145 
29146 
29147   input_path="$new_path"
29148   # Check if we need to convert this using DOS-style short mode. If the path
29149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29150   # take no chances and rewrite it.
29151   # Note: m4 eats our [], so we need to use [ and ] instead.
29152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29153   if test "x$has_forbidden_chars" != x; then
29154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29155     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29156   fi
29157 
29158 
29159   windows_path="$new_path"
29160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29161     unix_path=`$CYGPATH -u "$windows_path"`
29162     new_path="$unix_path"
29163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29165     new_path="$unix_path"
29166   fi
29167 
29168   if test "x$path" != "x$new_path"; then
29169     BOOT_JDK="$new_path"
29170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29171 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29172   fi
29173 
29174   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29175   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29176 
29177     else
29178       # We're on a unix platform. Hooray! :)
29179       path="$BOOT_JDK"
29180       has_space=`$ECHO "$path" | $GREP " "`
29181       if test "x$has_space" != x; then
29182         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29183 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29184         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29185       fi
29186 
29187       # Use eval to expand a potential ~
29188       eval path="$path"
29189       if test ! -f "$path" && test ! -d "$path"; then
29190         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29191       fi
29192 
29193       if test -d "$path"; then
29194         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29195       else
29196         dir="`$DIRNAME "$path"`"
29197         base="`$BASENAME "$path"`"
29198         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29199       fi
29200     fi
29201   fi
29202 
29203             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29204 $as_echo_n "checking for Boot JDK... " >&6; }
29205             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29206 $as_echo "$BOOT_JDK" >&6; }
29207             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29208 $as_echo_n "checking Boot JDK version... " >&6; }
29209             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29210             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29211 $as_echo "$BOOT_JDK_VERSION" >&6; }
29212           fi # end check jdk version
29213         fi # end check javac
29214       fi # end check java
29215     fi # end check boot jdk found
29216   fi
29217 
29218     done
29219   fi
29220 
29221 
29222     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29223     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29224       # Do we have a bin/java?
29225       if test ! -x "$BOOT_JDK/bin/java"; then
29226         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29227 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29228         BOOT_JDK_FOUND=no
29229       else
29230         # Do we have a bin/javac?
29231         if test ! -x "$BOOT_JDK/bin/javac"; then
29232           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29233 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29234           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29235 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29236           BOOT_JDK_FOUND=no
29237         else
29238           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29239           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29240 
29241           # Extra M4 quote needed to protect [] in grep expression.
29242           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
29243           if test "x$FOUND_CORRECT_VERSION" = x; then
29244             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29245 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29246             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
29247 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
29248             BOOT_JDK_FOUND=no
29249           else
29250             # We're done! :-)
29251             BOOT_JDK_FOUND=yes
29252 
29253   # Only process if variable expands to non-empty
29254 
29255   if test "x$BOOT_JDK" != x; then
29256     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29257 
29258   # Input might be given as Windows format, start by converting to
29259   # unix format.
29260   path="$BOOT_JDK"
29261   new_path=`$CYGPATH -u "$path"`
29262 
29263   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29264   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29265   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29266   # "foo.exe" is OK but "foo" is an error.
29267   #
29268   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29269   # It is also a way to make sure we got the proper file name for the real test later on.
29270   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29271   if test "x$test_shortpath" = x; then
29272     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29273 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29274     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29275   fi
29276 
29277   # Call helper function which possibly converts this using DOS-style short mode.
29278   # If so, the updated path is stored in $new_path.
29279 
29280   input_path="$new_path"
29281   # Check if we need to convert this using DOS-style short mode. If the path
29282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29283   # take no chances and rewrite it.
29284   # Note: m4 eats our [], so we need to use [ and ] instead.
29285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29286   if test "x$has_forbidden_chars" != x; then
29287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29288     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29289     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29290     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29291       # Going to short mode and back again did indeed matter. Since short mode is
29292       # case insensitive, let's make it lowercase to improve readability.
29293       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29294       # Now convert it back to Unix-style (cygpath)
29295       input_path=`$CYGPATH -u "$shortmode_path"`
29296       new_path="$input_path"
29297     fi
29298   fi
29299 
29300   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29301   if test "x$test_cygdrive_prefix" = x; then
29302     # As a simple fix, exclude /usr/bin since it's not a real path.
29303     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29304       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29305       # a path prefixed by /cygdrive for fixpath to work.
29306       new_path="$CYGWIN_ROOT_PATH$input_path"
29307     fi
29308   fi
29309 
29310 
29311   if test "x$path" != "x$new_path"; then
29312     BOOT_JDK="$new_path"
29313     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29314 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29315   fi
29316 
29317     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29318 
29319   path="$BOOT_JDK"
29320   has_colon=`$ECHO $path | $GREP ^.:`
29321   new_path="$path"
29322   if test "x$has_colon" = x; then
29323     # Not in mixed or Windows style, start by that.
29324     new_path=`cmd //c echo $path`
29325   fi
29326 
29327 
29328   input_path="$new_path"
29329   # Check if we need to convert this using DOS-style short mode. If the path
29330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29331   # take no chances and rewrite it.
29332   # Note: m4 eats our [], so we need to use [ and ] instead.
29333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29334   if test "x$has_forbidden_chars" != x; then
29335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29336     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29337   fi
29338 
29339 
29340   windows_path="$new_path"
29341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29342     unix_path=`$CYGPATH -u "$windows_path"`
29343     new_path="$unix_path"
29344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29346     new_path="$unix_path"
29347   fi
29348 
29349   if test "x$path" != "x$new_path"; then
29350     BOOT_JDK="$new_path"
29351     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29352 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29353   fi
29354 
29355   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29356   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29357 
29358     else
29359       # We're on a unix platform. Hooray! :)
29360       path="$BOOT_JDK"
29361       has_space=`$ECHO "$path" | $GREP " "`
29362       if test "x$has_space" != x; then
29363         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29364 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29365         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29366       fi
29367 
29368       # Use eval to expand a potential ~
29369       eval path="$path"
29370       if test ! -f "$path" && test ! -d "$path"; then
29371         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29372       fi
29373 
29374       if test -d "$path"; then
29375         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29376       else
29377         dir="`$DIRNAME "$path"`"
29378         base="`$BASENAME "$path"`"
29379         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29380       fi
29381     fi
29382   fi
29383 
29384             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29385 $as_echo_n "checking for Boot JDK... " >&6; }
29386             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29387 $as_echo "$BOOT_JDK" >&6; }
29388             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29389 $as_echo_n "checking Boot JDK version... " >&6; }
29390             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29391             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29392 $as_echo "$BOOT_JDK_VERSION" >&6; }
29393           fi # end check jdk version
29394         fi # end check javac
29395       fi # end check java
29396     fi # end check boot jdk found
29397   fi
29398 
29399   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29400 
29401   if test "x$BOOT_JDK_FOUND" = xno; then
29402     # Now execute the test
29403 
29404   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29405   BOOT_JDK_SUFFIX="/Contents/Home"
29406   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29407   if test "x$ALL_JDKS_FOUND" != x; then
29408     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29409 
29410   if test "x$BOOT_JDK_FOUND" = xno; then
29411     # Now execute the test
29412 
29413         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29414         if test -d "$BOOT_JDK"; then
29415           BOOT_JDK_FOUND=maybe
29416           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29417 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29418         fi
29419 
29420 
29421     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29422     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29423       # Do we have a bin/java?
29424       if test ! -x "$BOOT_JDK/bin/java"; then
29425         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29426 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29427         BOOT_JDK_FOUND=no
29428       else
29429         # Do we have a bin/javac?
29430         if test ! -x "$BOOT_JDK/bin/javac"; then
29431           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29432 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29433           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29434 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29435           BOOT_JDK_FOUND=no
29436         else
29437           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29438           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29439 
29440           # Extra M4 quote needed to protect [] in grep expression.
29441           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
29442           if test "x$FOUND_CORRECT_VERSION" = x; then
29443             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29444 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29445             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
29446 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
29447             BOOT_JDK_FOUND=no
29448           else
29449             # We're done! :-)
29450             BOOT_JDK_FOUND=yes
29451 
29452   # Only process if variable expands to non-empty
29453 
29454   if test "x$BOOT_JDK" != x; then
29455     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29456 
29457   # Input might be given as Windows format, start by converting to
29458   # unix format.
29459   path="$BOOT_JDK"
29460   new_path=`$CYGPATH -u "$path"`
29461 
29462   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29463   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29464   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29465   # "foo.exe" is OK but "foo" is an error.
29466   #
29467   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29468   # It is also a way to make sure we got the proper file name for the real test later on.
29469   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29470   if test "x$test_shortpath" = x; then
29471     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29472 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29473     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29474   fi
29475 
29476   # Call helper function which possibly converts this using DOS-style short mode.
29477   # If so, the updated path is stored in $new_path.
29478 
29479   input_path="$new_path"
29480   # Check if we need to convert this using DOS-style short mode. If the path
29481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29482   # take no chances and rewrite it.
29483   # Note: m4 eats our [], so we need to use [ and ] instead.
29484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29485   if test "x$has_forbidden_chars" != x; then
29486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29487     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29488     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29489     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29490       # Going to short mode and back again did indeed matter. Since short mode is
29491       # case insensitive, let's make it lowercase to improve readability.
29492       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29493       # Now convert it back to Unix-style (cygpath)
29494       input_path=`$CYGPATH -u "$shortmode_path"`
29495       new_path="$input_path"
29496     fi
29497   fi
29498 
29499   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29500   if test "x$test_cygdrive_prefix" = x; then
29501     # As a simple fix, exclude /usr/bin since it's not a real path.
29502     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29503       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29504       # a path prefixed by /cygdrive for fixpath to work.
29505       new_path="$CYGWIN_ROOT_PATH$input_path"
29506     fi
29507   fi
29508 
29509 
29510   if test "x$path" != "x$new_path"; then
29511     BOOT_JDK="$new_path"
29512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29513 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29514   fi
29515 
29516     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29517 
29518   path="$BOOT_JDK"
29519   has_colon=`$ECHO $path | $GREP ^.:`
29520   new_path="$path"
29521   if test "x$has_colon" = x; then
29522     # Not in mixed or Windows style, start by that.
29523     new_path=`cmd //c echo $path`
29524   fi
29525 
29526 
29527   input_path="$new_path"
29528   # Check if we need to convert this using DOS-style short mode. If the path
29529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29530   # take no chances and rewrite it.
29531   # Note: m4 eats our [], so we need to use [ and ] instead.
29532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29533   if test "x$has_forbidden_chars" != x; then
29534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29535     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29536   fi
29537 
29538 
29539   windows_path="$new_path"
29540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29541     unix_path=`$CYGPATH -u "$windows_path"`
29542     new_path="$unix_path"
29543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29545     new_path="$unix_path"
29546   fi
29547 
29548   if test "x$path" != "x$new_path"; then
29549     BOOT_JDK="$new_path"
29550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29551 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29552   fi
29553 
29554   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29555   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29556 
29557     else
29558       # We're on a unix platform. Hooray! :)
29559       path="$BOOT_JDK"
29560       has_space=`$ECHO "$path" | $GREP " "`
29561       if test "x$has_space" != x; then
29562         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29563 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29564         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29565       fi
29566 
29567       # Use eval to expand a potential ~
29568       eval path="$path"
29569       if test ! -f "$path" && test ! -d "$path"; then
29570         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29571       fi
29572 
29573       if test -d "$path"; then
29574         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29575       else
29576         dir="`$DIRNAME "$path"`"
29577         base="`$BASENAME "$path"`"
29578         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29579       fi
29580     fi
29581   fi
29582 
29583             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29584 $as_echo_n "checking for Boot JDK... " >&6; }
29585             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29586 $as_echo "$BOOT_JDK" >&6; }
29587             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29588 $as_echo_n "checking Boot JDK version... " >&6; }
29589             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29590             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29591 $as_echo "$BOOT_JDK_VERSION" >&6; }
29592           fi # end check jdk version
29593         fi # end check javac
29594       fi # end check java
29595     fi # end check boot jdk found
29596   fi
29597 
29598     done
29599   fi
29600 
29601 
29602     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29603     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29604       # Do we have a bin/java?
29605       if test ! -x "$BOOT_JDK/bin/java"; then
29606         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29607 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29608         BOOT_JDK_FOUND=no
29609       else
29610         # Do we have a bin/javac?
29611         if test ! -x "$BOOT_JDK/bin/javac"; then
29612           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29613 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29614           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29615 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29616           BOOT_JDK_FOUND=no
29617         else
29618           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29619           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29620 
29621           # Extra M4 quote needed to protect [] in grep expression.
29622           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
29623           if test "x$FOUND_CORRECT_VERSION" = x; then
29624             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29625 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29626             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
29627 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
29628             BOOT_JDK_FOUND=no
29629           else
29630             # We're done! :-)
29631             BOOT_JDK_FOUND=yes
29632 
29633   # Only process if variable expands to non-empty
29634 
29635   if test "x$BOOT_JDK" != x; then
29636     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29637 
29638   # Input might be given as Windows format, start by converting to
29639   # unix format.
29640   path="$BOOT_JDK"
29641   new_path=`$CYGPATH -u "$path"`
29642 
29643   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29644   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29645   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29646   # "foo.exe" is OK but "foo" is an error.
29647   #
29648   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29649   # It is also a way to make sure we got the proper file name for the real test later on.
29650   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29651   if test "x$test_shortpath" = x; then
29652     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29653 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29654     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29655   fi
29656 
29657   # Call helper function which possibly converts this using DOS-style short mode.
29658   # If so, the updated path is stored in $new_path.
29659 
29660   input_path="$new_path"
29661   # Check if we need to convert this using DOS-style short mode. If the path
29662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29663   # take no chances and rewrite it.
29664   # Note: m4 eats our [], so we need to use [ and ] instead.
29665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29666   if test "x$has_forbidden_chars" != x; then
29667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29668     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29669     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29670     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29671       # Going to short mode and back again did indeed matter. Since short mode is
29672       # case insensitive, let's make it lowercase to improve readability.
29673       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29674       # Now convert it back to Unix-style (cygpath)
29675       input_path=`$CYGPATH -u "$shortmode_path"`
29676       new_path="$input_path"
29677     fi
29678   fi
29679 
29680   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29681   if test "x$test_cygdrive_prefix" = x; then
29682     # As a simple fix, exclude /usr/bin since it's not a real path.
29683     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29684       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29685       # a path prefixed by /cygdrive for fixpath to work.
29686       new_path="$CYGWIN_ROOT_PATH$input_path"
29687     fi
29688   fi
29689 
29690 
29691   if test "x$path" != "x$new_path"; then
29692     BOOT_JDK="$new_path"
29693     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29694 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29695   fi
29696 
29697     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29698 
29699   path="$BOOT_JDK"
29700   has_colon=`$ECHO $path | $GREP ^.:`
29701   new_path="$path"
29702   if test "x$has_colon" = x; then
29703     # Not in mixed or Windows style, start by that.
29704     new_path=`cmd //c echo $path`
29705   fi
29706 
29707 
29708   input_path="$new_path"
29709   # Check if we need to convert this using DOS-style short mode. If the path
29710   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29711   # take no chances and rewrite it.
29712   # Note: m4 eats our [], so we need to use [ and ] instead.
29713   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29714   if test "x$has_forbidden_chars" != x; then
29715     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29716     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29717   fi
29718 
29719 
29720   windows_path="$new_path"
29721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29722     unix_path=`$CYGPATH -u "$windows_path"`
29723     new_path="$unix_path"
29724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29726     new_path="$unix_path"
29727   fi
29728 
29729   if test "x$path" != "x$new_path"; then
29730     BOOT_JDK="$new_path"
29731     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29732 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29733   fi
29734 
29735   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29736   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29737 
29738     else
29739       # We're on a unix platform. Hooray! :)
29740       path="$BOOT_JDK"
29741       has_space=`$ECHO "$path" | $GREP " "`
29742       if test "x$has_space" != x; then
29743         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29744 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29745         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29746       fi
29747 
29748       # Use eval to expand a potential ~
29749       eval path="$path"
29750       if test ! -f "$path" && test ! -d "$path"; then
29751         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29752       fi
29753 
29754       if test -d "$path"; then
29755         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29756       else
29757         dir="`$DIRNAME "$path"`"
29758         base="`$BASENAME "$path"`"
29759         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29760       fi
29761     fi
29762   fi
29763 
29764             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29765 $as_echo_n "checking for Boot JDK... " >&6; }
29766             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29767 $as_echo "$BOOT_JDK" >&6; }
29768             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29769 $as_echo_n "checking Boot JDK version... " >&6; }
29770             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29771             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29772 $as_echo "$BOOT_JDK_VERSION" >&6; }
29773           fi # end check jdk version
29774         fi # end check javac
29775       fi # end check java
29776     fi # end check boot jdk found
29777   fi
29778 
29779 
29780   if test "x$BOOT_JDK_FOUND" = xno; then
29781     # Now execute the test
29782 
29783   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29784   BOOT_JDK_SUFFIX="/Contents/Home"
29785   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29786   if test "x$ALL_JDKS_FOUND" != x; then
29787     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29788 
29789   if test "x$BOOT_JDK_FOUND" = xno; then
29790     # Now execute the test
29791 
29792         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29793         if test -d "$BOOT_JDK"; then
29794           BOOT_JDK_FOUND=maybe
29795           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29796 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29797         fi
29798 
29799 
29800     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29801     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29802       # Do we have a bin/java?
29803       if test ! -x "$BOOT_JDK/bin/java"; then
29804         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29805 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29806         BOOT_JDK_FOUND=no
29807       else
29808         # Do we have a bin/javac?
29809         if test ! -x "$BOOT_JDK/bin/javac"; then
29810           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29811 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29812           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29813 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29814           BOOT_JDK_FOUND=no
29815         else
29816           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29817           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29818 
29819           # Extra M4 quote needed to protect [] in grep expression.
29820           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
29821           if test "x$FOUND_CORRECT_VERSION" = x; then
29822             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29823 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29824             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
29825 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
29826             BOOT_JDK_FOUND=no
29827           else
29828             # We're done! :-)
29829             BOOT_JDK_FOUND=yes
29830 
29831   # Only process if variable expands to non-empty
29832 
29833   if test "x$BOOT_JDK" != x; then
29834     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29835 
29836   # Input might be given as Windows format, start by converting to
29837   # unix format.
29838   path="$BOOT_JDK"
29839   new_path=`$CYGPATH -u "$path"`
29840 
29841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29844   # "foo.exe" is OK but "foo" is an error.
29845   #
29846   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29847   # It is also a way to make sure we got the proper file name for the real test later on.
29848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29849   if test "x$test_shortpath" = x; then
29850     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29851 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29852     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29853   fi
29854 
29855   # Call helper function which possibly converts this using DOS-style short mode.
29856   # If so, the updated path is stored in $new_path.
29857 
29858   input_path="$new_path"
29859   # Check if we need to convert this using DOS-style short mode. If the path
29860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29861   # take no chances and rewrite it.
29862   # Note: m4 eats our [], so we need to use [ and ] instead.
29863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29864   if test "x$has_forbidden_chars" != x; then
29865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29866     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29867     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29868     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29869       # Going to short mode and back again did indeed matter. Since short mode is
29870       # case insensitive, let's make it lowercase to improve readability.
29871       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29872       # Now convert it back to Unix-style (cygpath)
29873       input_path=`$CYGPATH -u "$shortmode_path"`
29874       new_path="$input_path"
29875     fi
29876   fi
29877 
29878   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29879   if test "x$test_cygdrive_prefix" = x; then
29880     # As a simple fix, exclude /usr/bin since it's not a real path.
29881     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29882       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29883       # a path prefixed by /cygdrive for fixpath to work.
29884       new_path="$CYGWIN_ROOT_PATH$input_path"
29885     fi
29886   fi
29887 
29888 
29889   if test "x$path" != "x$new_path"; then
29890     BOOT_JDK="$new_path"
29891     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29892 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29893   fi
29894 
29895     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29896 
29897   path="$BOOT_JDK"
29898   has_colon=`$ECHO $path | $GREP ^.:`
29899   new_path="$path"
29900   if test "x$has_colon" = x; then
29901     # Not in mixed or Windows style, start by that.
29902     new_path=`cmd //c echo $path`
29903   fi
29904 
29905 
29906   input_path="$new_path"
29907   # Check if we need to convert this using DOS-style short mode. If the path
29908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29909   # take no chances and rewrite it.
29910   # Note: m4 eats our [], so we need to use [ and ] instead.
29911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29912   if test "x$has_forbidden_chars" != x; then
29913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29914     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29915   fi
29916 
29917 
29918   windows_path="$new_path"
29919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29920     unix_path=`$CYGPATH -u "$windows_path"`
29921     new_path="$unix_path"
29922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29924     new_path="$unix_path"
29925   fi
29926 
29927   if test "x$path" != "x$new_path"; then
29928     BOOT_JDK="$new_path"
29929     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29930 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29931   fi
29932 
29933   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29934   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29935 
29936     else
29937       # We're on a unix platform. Hooray! :)
29938       path="$BOOT_JDK"
29939       has_space=`$ECHO "$path" | $GREP " "`
29940       if test "x$has_space" != x; then
29941         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29942 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29943         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29944       fi
29945 
29946       # Use eval to expand a potential ~
29947       eval path="$path"
29948       if test ! -f "$path" && test ! -d "$path"; then
29949         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29950       fi
29951 
29952       if test -d "$path"; then
29953         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29954       else
29955         dir="`$DIRNAME "$path"`"
29956         base="`$BASENAME "$path"`"
29957         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29958       fi
29959     fi
29960   fi
29961 
29962             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29963 $as_echo_n "checking for Boot JDK... " >&6; }
29964             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29965 $as_echo "$BOOT_JDK" >&6; }
29966             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29967 $as_echo_n "checking Boot JDK version... " >&6; }
29968             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29969             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29970 $as_echo "$BOOT_JDK_VERSION" >&6; }
29971           fi # end check jdk version
29972         fi # end check javac
29973       fi # end check java
29974     fi # end check boot jdk found
29975   fi
29976 
29977     done
29978   fi
29979 
29980 
29981     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29982     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29983       # Do we have a bin/java?
29984       if test ! -x "$BOOT_JDK/bin/java"; then
29985         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29986 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29987         BOOT_JDK_FOUND=no
29988       else
29989         # Do we have a bin/javac?
29990         if test ! -x "$BOOT_JDK/bin/javac"; then
29991           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29992 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29993           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29994 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29995           BOOT_JDK_FOUND=no
29996         else
29997           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29998           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29999 
30000           # Extra M4 quote needed to protect [] in grep expression.
30001           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
30002           if test "x$FOUND_CORRECT_VERSION" = x; then
30003             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30004 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30005             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
30006 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
30007             BOOT_JDK_FOUND=no
30008           else
30009             # We're done! :-)
30010             BOOT_JDK_FOUND=yes
30011 
30012   # Only process if variable expands to non-empty
30013 
30014   if test "x$BOOT_JDK" != x; then
30015     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30016 
30017   # Input might be given as Windows format, start by converting to
30018   # unix format.
30019   path="$BOOT_JDK"
30020   new_path=`$CYGPATH -u "$path"`
30021 
30022   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30023   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30024   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30025   # "foo.exe" is OK but "foo" is an error.
30026   #
30027   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30028   # It is also a way to make sure we got the proper file name for the real test later on.
30029   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30030   if test "x$test_shortpath" = x; then
30031     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30032 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30033     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30034   fi
30035 
30036   # Call helper function which possibly converts this using DOS-style short mode.
30037   # If so, the updated path is stored in $new_path.
30038 
30039   input_path="$new_path"
30040   # Check if we need to convert this using DOS-style short mode. If the path
30041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30042   # take no chances and rewrite it.
30043   # Note: m4 eats our [], so we need to use [ and ] instead.
30044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30045   if test "x$has_forbidden_chars" != x; then
30046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30047     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30048     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30049     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30050       # Going to short mode and back again did indeed matter. Since short mode is
30051       # case insensitive, let's make it lowercase to improve readability.
30052       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30053       # Now convert it back to Unix-style (cygpath)
30054       input_path=`$CYGPATH -u "$shortmode_path"`
30055       new_path="$input_path"
30056     fi
30057   fi
30058 
30059   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30060   if test "x$test_cygdrive_prefix" = x; then
30061     # As a simple fix, exclude /usr/bin since it's not a real path.
30062     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30063       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30064       # a path prefixed by /cygdrive for fixpath to work.
30065       new_path="$CYGWIN_ROOT_PATH$input_path"
30066     fi
30067   fi
30068 
30069 
30070   if test "x$path" != "x$new_path"; then
30071     BOOT_JDK="$new_path"
30072     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30073 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30074   fi
30075 
30076     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30077 
30078   path="$BOOT_JDK"
30079   has_colon=`$ECHO $path | $GREP ^.:`
30080   new_path="$path"
30081   if test "x$has_colon" = x; then
30082     # Not in mixed or Windows style, start by that.
30083     new_path=`cmd //c echo $path`
30084   fi
30085 
30086 
30087   input_path="$new_path"
30088   # Check if we need to convert this using DOS-style short mode. If the path
30089   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30090   # take no chances and rewrite it.
30091   # Note: m4 eats our [], so we need to use [ and ] instead.
30092   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30093   if test "x$has_forbidden_chars" != x; then
30094     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30095     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30096   fi
30097 
30098 
30099   windows_path="$new_path"
30100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30101     unix_path=`$CYGPATH -u "$windows_path"`
30102     new_path="$unix_path"
30103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30105     new_path="$unix_path"
30106   fi
30107 
30108   if test "x$path" != "x$new_path"; then
30109     BOOT_JDK="$new_path"
30110     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30111 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30112   fi
30113 
30114   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30115   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30116 
30117     else
30118       # We're on a unix platform. Hooray! :)
30119       path="$BOOT_JDK"
30120       has_space=`$ECHO "$path" | $GREP " "`
30121       if test "x$has_space" != x; then
30122         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30123 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30124         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30125       fi
30126 
30127       # Use eval to expand a potential ~
30128       eval path="$path"
30129       if test ! -f "$path" && test ! -d "$path"; then
30130         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30131       fi
30132 
30133       if test -d "$path"; then
30134         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30135       else
30136         dir="`$DIRNAME "$path"`"
30137         base="`$BASENAME "$path"`"
30138         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30139       fi
30140     fi
30141   fi
30142 
30143             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30144 $as_echo_n "checking for Boot JDK... " >&6; }
30145             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30146 $as_echo "$BOOT_JDK" >&6; }
30147             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30148 $as_echo_n "checking Boot JDK version... " >&6; }
30149             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30150             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30151 $as_echo "$BOOT_JDK_VERSION" >&6; }
30152           fi # end check jdk version
30153         fi # end check javac
30154       fi # end check java
30155     fi # end check boot jdk found
30156   fi
30157 
30158   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30159 
30160   if test "x$BOOT_JDK_FOUND" = xno; then
30161     # Now execute the test
30162 
30163   BOOT_JDK_PREFIX="/usr/lib/jvm"
30164   BOOT_JDK_SUFFIX=""
30165   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30166   if test "x$ALL_JDKS_FOUND" != x; then
30167     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30168 
30169   if test "x$BOOT_JDK_FOUND" = xno; then
30170     # Now execute the test
30171 
30172         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30173         if test -d "$BOOT_JDK"; then
30174           BOOT_JDK_FOUND=maybe
30175           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30176 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30177         fi
30178 
30179 
30180     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30181     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30182       # Do we have a bin/java?
30183       if test ! -x "$BOOT_JDK/bin/java"; then
30184         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30185 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30186         BOOT_JDK_FOUND=no
30187       else
30188         # Do we have a bin/javac?
30189         if test ! -x "$BOOT_JDK/bin/javac"; then
30190           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30191 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30192           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30193 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30194           BOOT_JDK_FOUND=no
30195         else
30196           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30197           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30198 
30199           # Extra M4 quote needed to protect [] in grep expression.
30200           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
30201           if test "x$FOUND_CORRECT_VERSION" = x; then
30202             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30203 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30204             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
30205 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
30206             BOOT_JDK_FOUND=no
30207           else
30208             # We're done! :-)
30209             BOOT_JDK_FOUND=yes
30210 
30211   # Only process if variable expands to non-empty
30212 
30213   if test "x$BOOT_JDK" != x; then
30214     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30215 
30216   # Input might be given as Windows format, start by converting to
30217   # unix format.
30218   path="$BOOT_JDK"
30219   new_path=`$CYGPATH -u "$path"`
30220 
30221   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30222   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30223   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30224   # "foo.exe" is OK but "foo" is an error.
30225   #
30226   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30227   # It is also a way to make sure we got the proper file name for the real test later on.
30228   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30229   if test "x$test_shortpath" = x; then
30230     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30231 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30232     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30233   fi
30234 
30235   # Call helper function which possibly converts this using DOS-style short mode.
30236   # If so, the updated path is stored in $new_path.
30237 
30238   input_path="$new_path"
30239   # Check if we need to convert this using DOS-style short mode. If the path
30240   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30241   # take no chances and rewrite it.
30242   # Note: m4 eats our [], so we need to use [ and ] instead.
30243   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30244   if test "x$has_forbidden_chars" != x; then
30245     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30246     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30247     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30248     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30249       # Going to short mode and back again did indeed matter. Since short mode is
30250       # case insensitive, let's make it lowercase to improve readability.
30251       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30252       # Now convert it back to Unix-style (cygpath)
30253       input_path=`$CYGPATH -u "$shortmode_path"`
30254       new_path="$input_path"
30255     fi
30256   fi
30257 
30258   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30259   if test "x$test_cygdrive_prefix" = x; then
30260     # As a simple fix, exclude /usr/bin since it's not a real path.
30261     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30262       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30263       # a path prefixed by /cygdrive for fixpath to work.
30264       new_path="$CYGWIN_ROOT_PATH$input_path"
30265     fi
30266   fi
30267 
30268 
30269   if test "x$path" != "x$new_path"; then
30270     BOOT_JDK="$new_path"
30271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30272 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30273   fi
30274 
30275     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30276 
30277   path="$BOOT_JDK"
30278   has_colon=`$ECHO $path | $GREP ^.:`
30279   new_path="$path"
30280   if test "x$has_colon" = x; then
30281     # Not in mixed or Windows style, start by that.
30282     new_path=`cmd //c echo $path`
30283   fi
30284 
30285 
30286   input_path="$new_path"
30287   # Check if we need to convert this using DOS-style short mode. If the path
30288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30289   # take no chances and rewrite it.
30290   # Note: m4 eats our [], so we need to use [ and ] instead.
30291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30292   if test "x$has_forbidden_chars" != x; then
30293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30294     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30295   fi
30296 
30297 
30298   windows_path="$new_path"
30299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30300     unix_path=`$CYGPATH -u "$windows_path"`
30301     new_path="$unix_path"
30302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30304     new_path="$unix_path"
30305   fi
30306 
30307   if test "x$path" != "x$new_path"; then
30308     BOOT_JDK="$new_path"
30309     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30310 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30311   fi
30312 
30313   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30314   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30315 
30316     else
30317       # We're on a unix platform. Hooray! :)
30318       path="$BOOT_JDK"
30319       has_space=`$ECHO "$path" | $GREP " "`
30320       if test "x$has_space" != x; then
30321         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30322 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30323         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30324       fi
30325 
30326       # Use eval to expand a potential ~
30327       eval path="$path"
30328       if test ! -f "$path" && test ! -d "$path"; then
30329         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30330       fi
30331 
30332       if test -d "$path"; then
30333         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30334       else
30335         dir="`$DIRNAME "$path"`"
30336         base="`$BASENAME "$path"`"
30337         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30338       fi
30339     fi
30340   fi
30341 
30342             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30343 $as_echo_n "checking for Boot JDK... " >&6; }
30344             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30345 $as_echo "$BOOT_JDK" >&6; }
30346             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30347 $as_echo_n "checking Boot JDK version... " >&6; }
30348             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30349             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30350 $as_echo "$BOOT_JDK_VERSION" >&6; }
30351           fi # end check jdk version
30352         fi # end check javac
30353       fi # end check java
30354     fi # end check boot jdk found
30355   fi
30356 
30357     done
30358   fi
30359 
30360 
30361     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30362     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30363       # Do we have a bin/java?
30364       if test ! -x "$BOOT_JDK/bin/java"; then
30365         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30366 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30367         BOOT_JDK_FOUND=no
30368       else
30369         # Do we have a bin/javac?
30370         if test ! -x "$BOOT_JDK/bin/javac"; then
30371           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30372 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30373           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30374 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30375           BOOT_JDK_FOUND=no
30376         else
30377           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30378           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30379 
30380           # Extra M4 quote needed to protect [] in grep expression.
30381           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
30382           if test "x$FOUND_CORRECT_VERSION" = x; then
30383             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30384 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30385             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
30386 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
30387             BOOT_JDK_FOUND=no
30388           else
30389             # We're done! :-)
30390             BOOT_JDK_FOUND=yes
30391 
30392   # Only process if variable expands to non-empty
30393 
30394   if test "x$BOOT_JDK" != x; then
30395     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30396 
30397   # Input might be given as Windows format, start by converting to
30398   # unix format.
30399   path="$BOOT_JDK"
30400   new_path=`$CYGPATH -u "$path"`
30401 
30402   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30403   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30404   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30405   # "foo.exe" is OK but "foo" is an error.
30406   #
30407   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30408   # It is also a way to make sure we got the proper file name for the real test later on.
30409   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30410   if test "x$test_shortpath" = x; then
30411     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30412 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30413     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30414   fi
30415 
30416   # Call helper function which possibly converts this using DOS-style short mode.
30417   # If so, the updated path is stored in $new_path.
30418 
30419   input_path="$new_path"
30420   # Check if we need to convert this using DOS-style short mode. If the path
30421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30422   # take no chances and rewrite it.
30423   # Note: m4 eats our [], so we need to use [ and ] instead.
30424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30425   if test "x$has_forbidden_chars" != x; then
30426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30427     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30428     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30429     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30430       # Going to short mode and back again did indeed matter. Since short mode is
30431       # case insensitive, let's make it lowercase to improve readability.
30432       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30433       # Now convert it back to Unix-style (cygpath)
30434       input_path=`$CYGPATH -u "$shortmode_path"`
30435       new_path="$input_path"
30436     fi
30437   fi
30438 
30439   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30440   if test "x$test_cygdrive_prefix" = x; then
30441     # As a simple fix, exclude /usr/bin since it's not a real path.
30442     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30443       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30444       # a path prefixed by /cygdrive for fixpath to work.
30445       new_path="$CYGWIN_ROOT_PATH$input_path"
30446     fi
30447   fi
30448 
30449 
30450   if test "x$path" != "x$new_path"; then
30451     BOOT_JDK="$new_path"
30452     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30453 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30454   fi
30455 
30456     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30457 
30458   path="$BOOT_JDK"
30459   has_colon=`$ECHO $path | $GREP ^.:`
30460   new_path="$path"
30461   if test "x$has_colon" = x; then
30462     # Not in mixed or Windows style, start by that.
30463     new_path=`cmd //c echo $path`
30464   fi
30465 
30466 
30467   input_path="$new_path"
30468   # Check if we need to convert this using DOS-style short mode. If the path
30469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30470   # take no chances and rewrite it.
30471   # Note: m4 eats our [], so we need to use [ and ] instead.
30472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30473   if test "x$has_forbidden_chars" != x; then
30474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30475     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30476   fi
30477 
30478 
30479   windows_path="$new_path"
30480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30481     unix_path=`$CYGPATH -u "$windows_path"`
30482     new_path="$unix_path"
30483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30484     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30485     new_path="$unix_path"
30486   fi
30487 
30488   if test "x$path" != "x$new_path"; then
30489     BOOT_JDK="$new_path"
30490     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30491 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30492   fi
30493 
30494   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30495   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30496 
30497     else
30498       # We're on a unix platform. Hooray! :)
30499       path="$BOOT_JDK"
30500       has_space=`$ECHO "$path" | $GREP " "`
30501       if test "x$has_space" != x; then
30502         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30503 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30504         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30505       fi
30506 
30507       # Use eval to expand a potential ~
30508       eval path="$path"
30509       if test ! -f "$path" && test ! -d "$path"; then
30510         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30511       fi
30512 
30513       if test -d "$path"; then
30514         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30515       else
30516         dir="`$DIRNAME "$path"`"
30517         base="`$BASENAME "$path"`"
30518         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30519       fi
30520     fi
30521   fi
30522 
30523             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30524 $as_echo_n "checking for Boot JDK... " >&6; }
30525             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30526 $as_echo "$BOOT_JDK" >&6; }
30527             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30528 $as_echo_n "checking Boot JDK version... " >&6; }
30529             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30530             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30531 $as_echo "$BOOT_JDK_VERSION" >&6; }
30532           fi # end check jdk version
30533         fi # end check javac
30534       fi # end check java
30535     fi # end check boot jdk found
30536   fi
30537 
30538   fi
30539 
30540 
30541     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30542     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30543       # Do we have a bin/java?
30544       if test ! -x "$BOOT_JDK/bin/java"; then
30545         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30546 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30547         BOOT_JDK_FOUND=no
30548       else
30549         # Do we have a bin/javac?
30550         if test ! -x "$BOOT_JDK/bin/javac"; then
30551           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30552 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30553           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30554 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30555           BOOT_JDK_FOUND=no
30556         else
30557           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30558           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30559 
30560           # Extra M4 quote needed to protect [] in grep expression.
30561           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
30562           if test "x$FOUND_CORRECT_VERSION" = x; then
30563             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30564 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30565             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
30566 $as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
30567             BOOT_JDK_FOUND=no
30568           else
30569             # We're done! :-)
30570             BOOT_JDK_FOUND=yes
30571 
30572   # Only process if variable expands to non-empty
30573 
30574   if test "x$BOOT_JDK" != x; then
30575     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30576 
30577   # Input might be given as Windows format, start by converting to
30578   # unix format.
30579   path="$BOOT_JDK"
30580   new_path=`$CYGPATH -u "$path"`
30581 
30582   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30583   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30584   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30585   # "foo.exe" is OK but "foo" is an error.
30586   #
30587   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30588   # It is also a way to make sure we got the proper file name for the real test later on.
30589   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30590   if test "x$test_shortpath" = x; then
30591     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30592 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30593     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30594   fi
30595 
30596   # Call helper function which possibly converts this using DOS-style short mode.
30597   # If so, the updated path is stored in $new_path.
30598 
30599   input_path="$new_path"
30600   # Check if we need to convert this using DOS-style short mode. If the path
30601   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30602   # take no chances and rewrite it.
30603   # Note: m4 eats our [], so we need to use [ and ] instead.
30604   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30605   if test "x$has_forbidden_chars" != x; then
30606     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30607     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30608     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30609     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30610       # Going to short mode and back again did indeed matter. Since short mode is
30611       # case insensitive, let's make it lowercase to improve readability.
30612       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30613       # Now convert it back to Unix-style (cygpath)
30614       input_path=`$CYGPATH -u "$shortmode_path"`
30615       new_path="$input_path"
30616     fi
30617   fi
30618 
30619   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30620   if test "x$test_cygdrive_prefix" = x; then
30621     # As a simple fix, exclude /usr/bin since it's not a real path.
30622     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30623       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30624       # a path prefixed by /cygdrive for fixpath to work.
30625       new_path="$CYGWIN_ROOT_PATH$input_path"
30626     fi
30627   fi
30628 
30629 
30630   if test "x$path" != "x$new_path"; then
30631     BOOT_JDK="$new_path"
30632     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30633 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30634   fi
30635 
30636     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30637 
30638   path="$BOOT_JDK"
30639   has_colon=`$ECHO $path | $GREP ^.:`
30640   new_path="$path"
30641   if test "x$has_colon" = x; then
30642     # Not in mixed or Windows style, start by that.
30643     new_path=`cmd //c echo $path`
30644   fi
30645 
30646 
30647   input_path="$new_path"
30648   # Check if we need to convert this using DOS-style short mode. If the path
30649   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30650   # take no chances and rewrite it.
30651   # Note: m4 eats our [], so we need to use [ and ] instead.
30652   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30653   if test "x$has_forbidden_chars" != x; then
30654     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30655     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30656   fi
30657 
30658 
30659   windows_path="$new_path"
30660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30661     unix_path=`$CYGPATH -u "$windows_path"`
30662     new_path="$unix_path"
30663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30665     new_path="$unix_path"
30666   fi
30667 
30668   if test "x$path" != "x$new_path"; then
30669     BOOT_JDK="$new_path"
30670     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30671 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30672   fi
30673 
30674   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30675   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30676 
30677     else
30678       # We're on a unix platform. Hooray! :)
30679       path="$BOOT_JDK"
30680       has_space=`$ECHO "$path" | $GREP " "`
30681       if test "x$has_space" != x; then
30682         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30683 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30684         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30685       fi
30686 
30687       # Use eval to expand a potential ~
30688       eval path="$path"
30689       if test ! -f "$path" && test ! -d "$path"; then
30690         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30691       fi
30692 
30693       if test -d "$path"; then
30694         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30695       else
30696         dir="`$DIRNAME "$path"`"
30697         base="`$BASENAME "$path"`"
30698         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30699       fi
30700     fi
30701   fi
30702 
30703             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30704 $as_echo_n "checking for Boot JDK... " >&6; }
30705             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30706 $as_echo "$BOOT_JDK" >&6; }
30707             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30708 $as_echo_n "checking Boot JDK version... " >&6; }
30709             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30710             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30711 $as_echo "$BOOT_JDK_VERSION" >&6; }
30712           fi # end check jdk version
30713         fi # end check javac
30714       fi # end check java
30715     fi # end check boot jdk found
30716   fi
30717 
30718 
30719   # If we haven't found anything yet, we've truly lost. Give up.
30720   if test "x$BOOT_JDK_FOUND" = xno; then
30721 
30722   # Print a helpful message on how to acquire the necessary build dependency.
30723   # openjdk is the help tag: freetype, cups, alsa etc
30724   MISSING_DEPENDENCY=openjdk
30725 
30726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30727     cygwin_help $MISSING_DEPENDENCY
30728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30729     msys_help $MISSING_DEPENDENCY
30730   else
30731     PKGHANDLER_COMMAND=
30732 
30733     case $PKGHANDLER in
30734       apt-get)
30735         apt_help     $MISSING_DEPENDENCY ;;
30736       yum)
30737         yum_help     $MISSING_DEPENDENCY ;;
30738       brew)
30739         brew_help    $MISSING_DEPENDENCY ;;
30740       port)
30741         port_help    $MISSING_DEPENDENCY ;;
30742       pkgutil)
30743         pkgutil_help $MISSING_DEPENDENCY ;;
30744       pkgadd)
30745         pkgadd_help  $MISSING_DEPENDENCY ;;
30746     esac
30747 
30748     if test "x$PKGHANDLER_COMMAND" != x; then
30749       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30750     fi
30751   fi
30752 
30753     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30754 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30755     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30756 $as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30757     as_fn_error $? "Cannot continue" "$LINENO" 5
30758   fi
30759 
30760 
30761 
30762   # Setup tools from the Boot JDK.
30763 
30764   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30765 
30766   # Publish this variable in the help.
30767 
30768 
30769   if [ -z "${JAVA+x}" ]; then
30770     # The variable is not set by user, try to locate tool using the code snippet
30771 
30772       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30773 $as_echo_n "checking for java in Boot JDK... " >&6; }
30774       JAVA=$BOOT_JDK/bin/java
30775       if test ! -x $JAVA; then
30776         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30777 $as_echo "not found" >&6; }
30778         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30779 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30780         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30781       fi
30782       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30783 $as_echo "ok" >&6; }
30784 
30785 
30786   else
30787     # The variable is set, but is it from the command line or the environment?
30788 
30789     # Try to remove the string !JAVA! from our list.
30790     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30791     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30792       # If it failed, the variable was not from the command line. Ignore it,
30793       # but warn the user (except for BASH, which is always set by the calling BASH).
30794       if test "xJAVA" != xBASH; then
30795         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30796 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30797       fi
30798       # Try to locate tool using the code snippet
30799 
30800       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30801 $as_echo_n "checking for java in Boot JDK... " >&6; }
30802       JAVA=$BOOT_JDK/bin/java
30803       if test ! -x $JAVA; then
30804         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30805 $as_echo "not found" >&6; }
30806         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30807 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30808         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30809       fi
30810       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30811 $as_echo "ok" >&6; }
30812 
30813 
30814     else
30815       # If it succeeded, then it was overridden by the user. We will use it
30816       # for the tool.
30817 
30818       # First remove it from the list of overridden variables, so we can test
30819       # for unknown variables in the end.
30820       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30821 
30822       # Check if we try to supply an empty value
30823       if test "x$JAVA" = x; then
30824         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30825 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30826         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30827 $as_echo_n "checking for JAVA... " >&6; }
30828         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30829 $as_echo "disabled" >&6; }
30830       else
30831         # Check if the provided tool contains a complete path.
30832         tool_specified="$JAVA"
30833         tool_basename="${tool_specified##*/}"
30834         if test "x$tool_basename" = "x$tool_specified"; then
30835           # A command without a complete path is provided, search $PATH.
30836           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30837 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30838           # Extract the first word of "$tool_basename", so it can be a program name with args.
30839 set dummy $tool_basename; ac_word=$2
30840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30841 $as_echo_n "checking for $ac_word... " >&6; }
30842 if ${ac_cv_path_JAVA+:} false; then :
30843   $as_echo_n "(cached) " >&6
30844 else
30845   case $JAVA in
30846   [\\/]* | ?:[\\/]*)
30847   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30848   ;;
30849   *)
30850   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30851 for as_dir in $PATH
30852 do
30853   IFS=$as_save_IFS
30854   test -z "$as_dir" && as_dir=.
30855     for ac_exec_ext in '' $ac_executable_extensions; do
30856   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30857     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30858     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30859     break 2
30860   fi
30861 done
30862   done
30863 IFS=$as_save_IFS
30864 
30865   ;;
30866 esac
30867 fi
30868 JAVA=$ac_cv_path_JAVA
30869 if test -n "$JAVA"; then
30870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30871 $as_echo "$JAVA" >&6; }
30872 else
30873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30874 $as_echo "no" >&6; }
30875 fi
30876 
30877 
30878           if test "x$JAVA" = x; then
30879             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30880           fi
30881         else
30882           # Otherwise we believe it is a complete path. Use it as it is.
30883           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30884 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30885           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30886 $as_echo_n "checking for JAVA... " >&6; }
30887           if test ! -x "$tool_specified"; then
30888             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30889 $as_echo "not found" >&6; }
30890             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30891           fi
30892           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30893 $as_echo "$tool_specified" >&6; }
30894         fi
30895       fi
30896     fi
30897 
30898   fi
30899 
30900 
30901 
30902   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30903 
30904   # Publish this variable in the help.
30905 
30906 
30907   if [ -z "${JAVAC+x}" ]; then
30908     # The variable is not set by user, try to locate tool using the code snippet
30909 
30910       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30911 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30912       JAVAC=$BOOT_JDK/bin/javac
30913       if test ! -x $JAVAC; then
30914         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30915 $as_echo "not found" >&6; }
30916         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30917 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30918         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30919       fi
30920       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30921 $as_echo "ok" >&6; }
30922 
30923 
30924   else
30925     # The variable is set, but is it from the command line or the environment?
30926 
30927     # Try to remove the string !JAVAC! from our list.
30928     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30929     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30930       # If it failed, the variable was not from the command line. Ignore it,
30931       # but warn the user (except for BASH, which is always set by the calling BASH).
30932       if test "xJAVAC" != xBASH; then
30933         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30934 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30935       fi
30936       # Try to locate tool using the code snippet
30937 
30938       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30939 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30940       JAVAC=$BOOT_JDK/bin/javac
30941       if test ! -x $JAVAC; then
30942         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30943 $as_echo "not found" >&6; }
30944         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30945 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30946         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30947       fi
30948       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30949 $as_echo "ok" >&6; }
30950 
30951 
30952     else
30953       # If it succeeded, then it was overridden by the user. We will use it
30954       # for the tool.
30955 
30956       # First remove it from the list of overridden variables, so we can test
30957       # for unknown variables in the end.
30958       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30959 
30960       # Check if we try to supply an empty value
30961       if test "x$JAVAC" = x; then
30962         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30963 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30964         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30965 $as_echo_n "checking for JAVAC... " >&6; }
30966         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30967 $as_echo "disabled" >&6; }
30968       else
30969         # Check if the provided tool contains a complete path.
30970         tool_specified="$JAVAC"
30971         tool_basename="${tool_specified##*/}"
30972         if test "x$tool_basename" = "x$tool_specified"; then
30973           # A command without a complete path is provided, search $PATH.
30974           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30975 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30976           # Extract the first word of "$tool_basename", so it can be a program name with args.
30977 set dummy $tool_basename; ac_word=$2
30978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30979 $as_echo_n "checking for $ac_word... " >&6; }
30980 if ${ac_cv_path_JAVAC+:} false; then :
30981   $as_echo_n "(cached) " >&6
30982 else
30983   case $JAVAC in
30984   [\\/]* | ?:[\\/]*)
30985   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30986   ;;
30987   *)
30988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30989 for as_dir in $PATH
30990 do
30991   IFS=$as_save_IFS
30992   test -z "$as_dir" && as_dir=.
30993     for ac_exec_ext in '' $ac_executable_extensions; do
30994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30995     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30997     break 2
30998   fi
30999 done
31000   done
31001 IFS=$as_save_IFS
31002 
31003   ;;
31004 esac
31005 fi
31006 JAVAC=$ac_cv_path_JAVAC
31007 if test -n "$JAVAC"; then
31008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
31009 $as_echo "$JAVAC" >&6; }
31010 else
31011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31012 $as_echo "no" >&6; }
31013 fi
31014 
31015 
31016           if test "x$JAVAC" = x; then
31017             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31018           fi
31019         else
31020           # Otherwise we believe it is a complete path. Use it as it is.
31021           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
31022 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
31023           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
31024 $as_echo_n "checking for JAVAC... " >&6; }
31025           if test ! -x "$tool_specified"; then
31026             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31027 $as_echo "not found" >&6; }
31028             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
31029           fi
31030           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31031 $as_echo "$tool_specified" >&6; }
31032         fi
31033       fi
31034     fi
31035 
31036   fi
31037 
31038 
31039 
31040   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31041 
31042   # Publish this variable in the help.
31043 
31044 
31045   if [ -z "${JAVAH+x}" ]; then
31046     # The variable is not set by user, try to locate tool using the code snippet
31047 
31048       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31049 $as_echo_n "checking for javah in Boot JDK... " >&6; }
31050       JAVAH=$BOOT_JDK/bin/javah
31051       if test ! -x $JAVAH; then
31052         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31053 $as_echo "not found" >&6; }
31054         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31055 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31056         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31057       fi
31058       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31059 $as_echo "ok" >&6; }
31060 
31061 
31062   else
31063     # The variable is set, but is it from the command line or the environment?
31064 
31065     # Try to remove the string !JAVAH! from our list.
31066     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
31067     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31068       # If it failed, the variable was not from the command line. Ignore it,
31069       # but warn the user (except for BASH, which is always set by the calling BASH).
31070       if test "xJAVAH" != xBASH; then
31071         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
31072 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
31073       fi
31074       # Try to locate tool using the code snippet
31075 
31076       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31077 $as_echo_n "checking for javah in Boot JDK... " >&6; }
31078       JAVAH=$BOOT_JDK/bin/javah
31079       if test ! -x $JAVAH; then
31080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31081 $as_echo "not found" >&6; }
31082         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31083 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31084         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31085       fi
31086       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31087 $as_echo "ok" >&6; }
31088 
31089 
31090     else
31091       # If it succeeded, then it was overridden by the user. We will use it
31092       # for the tool.
31093 
31094       # First remove it from the list of overridden variables, so we can test
31095       # for unknown variables in the end.
31096       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31097 
31098       # Check if we try to supply an empty value
31099       if test "x$JAVAH" = x; then
31100         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31101 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31102         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31103 $as_echo_n "checking for JAVAH... " >&6; }
31104         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31105 $as_echo "disabled" >&6; }
31106       else
31107         # Check if the provided tool contains a complete path.
31108         tool_specified="$JAVAH"
31109         tool_basename="${tool_specified##*/}"
31110         if test "x$tool_basename" = "x$tool_specified"; then
31111           # A command without a complete path is provided, search $PATH.
31112           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31113 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31114           # Extract the first word of "$tool_basename", so it can be a program name with args.
31115 set dummy $tool_basename; ac_word=$2
31116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31117 $as_echo_n "checking for $ac_word... " >&6; }
31118 if ${ac_cv_path_JAVAH+:} false; then :
31119   $as_echo_n "(cached) " >&6
31120 else
31121   case $JAVAH in
31122   [\\/]* | ?:[\\/]*)
31123   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31124   ;;
31125   *)
31126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31127 for as_dir in $PATH
31128 do
31129   IFS=$as_save_IFS
31130   test -z "$as_dir" && as_dir=.
31131     for ac_exec_ext in '' $ac_executable_extensions; do
31132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31133     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31135     break 2
31136   fi
31137 done
31138   done
31139 IFS=$as_save_IFS
31140 
31141   ;;
31142 esac
31143 fi
31144 JAVAH=$ac_cv_path_JAVAH
31145 if test -n "$JAVAH"; then
31146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31147 $as_echo "$JAVAH" >&6; }
31148 else
31149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31150 $as_echo "no" >&6; }
31151 fi
31152 
31153 
31154           if test "x$JAVAH" = x; then
31155             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31156           fi
31157         else
31158           # Otherwise we believe it is a complete path. Use it as it is.
31159           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31160 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31161           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31162 $as_echo_n "checking for JAVAH... " >&6; }
31163           if test ! -x "$tool_specified"; then
31164             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31165 $as_echo "not found" >&6; }
31166             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31167           fi
31168           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31169 $as_echo "$tool_specified" >&6; }
31170         fi
31171       fi
31172     fi
31173 
31174   fi
31175 
31176 
31177 
31178   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31179 
31180   # Publish this variable in the help.
31181 
31182 
31183   if [ -z "${JAR+x}" ]; then
31184     # The variable is not set by user, try to locate tool using the code snippet
31185 
31186       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31187 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31188       JAR=$BOOT_JDK/bin/jar
31189       if test ! -x $JAR; then
31190         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31191 $as_echo "not found" >&6; }
31192         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31193 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31194         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31195       fi
31196       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31197 $as_echo "ok" >&6; }
31198 
31199 
31200   else
31201     # The variable is set, but is it from the command line or the environment?
31202 
31203     # Try to remove the string !JAR! from our list.
31204     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31205     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31206       # If it failed, the variable was not from the command line. Ignore it,
31207       # but warn the user (except for BASH, which is always set by the calling BASH).
31208       if test "xJAR" != xBASH; then
31209         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31210 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31211       fi
31212       # Try to locate tool using the code snippet
31213 
31214       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31215 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31216       JAR=$BOOT_JDK/bin/jar
31217       if test ! -x $JAR; then
31218         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31219 $as_echo "not found" >&6; }
31220         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31221 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31222         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31223       fi
31224       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31225 $as_echo "ok" >&6; }
31226 
31227 
31228     else
31229       # If it succeeded, then it was overridden by the user. We will use it
31230       # for the tool.
31231 
31232       # First remove it from the list of overridden variables, so we can test
31233       # for unknown variables in the end.
31234       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31235 
31236       # Check if we try to supply an empty value
31237       if test "x$JAR" = x; then
31238         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31239 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31240         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31241 $as_echo_n "checking for JAR... " >&6; }
31242         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31243 $as_echo "disabled" >&6; }
31244       else
31245         # Check if the provided tool contains a complete path.
31246         tool_specified="$JAR"
31247         tool_basename="${tool_specified##*/}"
31248         if test "x$tool_basename" = "x$tool_specified"; then
31249           # A command without a complete path is provided, search $PATH.
31250           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31251 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31252           # Extract the first word of "$tool_basename", so it can be a program name with args.
31253 set dummy $tool_basename; ac_word=$2
31254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31255 $as_echo_n "checking for $ac_word... " >&6; }
31256 if ${ac_cv_path_JAR+:} false; then :
31257   $as_echo_n "(cached) " >&6
31258 else
31259   case $JAR in
31260   [\\/]* | ?:[\\/]*)
31261   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31262   ;;
31263   *)
31264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31265 for as_dir in $PATH
31266 do
31267   IFS=$as_save_IFS
31268   test -z "$as_dir" && as_dir=.
31269     for ac_exec_ext in '' $ac_executable_extensions; do
31270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31271     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31273     break 2
31274   fi
31275 done
31276   done
31277 IFS=$as_save_IFS
31278 
31279   ;;
31280 esac
31281 fi
31282 JAR=$ac_cv_path_JAR
31283 if test -n "$JAR"; then
31284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31285 $as_echo "$JAR" >&6; }
31286 else
31287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31288 $as_echo "no" >&6; }
31289 fi
31290 
31291 
31292           if test "x$JAR" = x; then
31293             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31294           fi
31295         else
31296           # Otherwise we believe it is a complete path. Use it as it is.
31297           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31298 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31299           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31300 $as_echo_n "checking for JAR... " >&6; }
31301           if test ! -x "$tool_specified"; then
31302             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31303 $as_echo "not found" >&6; }
31304             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31305           fi
31306           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31307 $as_echo "$tool_specified" >&6; }
31308         fi
31309       fi
31310     fi
31311 
31312   fi
31313 
31314 
31315 
31316   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31317 
31318   # Publish this variable in the help.
31319 
31320 
31321   if [ -z "${JARSIGNER+x}" ]; then
31322     # The variable is not set by user, try to locate tool using the code snippet
31323 
31324       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31325 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31326       JARSIGNER=$BOOT_JDK/bin/jarsigner
31327       if test ! -x $JARSIGNER; then
31328         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31329 $as_echo "not found" >&6; }
31330         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31331 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31332         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31333       fi
31334       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31335 $as_echo "ok" >&6; }
31336 
31337 
31338   else
31339     # The variable is set, but is it from the command line or the environment?
31340 
31341     # Try to remove the string !JARSIGNER! from our list.
31342     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31343     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31344       # If it failed, the variable was not from the command line. Ignore it,
31345       # but warn the user (except for BASH, which is always set by the calling BASH).
31346       if test "xJARSIGNER" != xBASH; then
31347         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31348 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31349       fi
31350       # Try to locate tool using the code snippet
31351 
31352       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31353 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31354       JARSIGNER=$BOOT_JDK/bin/jarsigner
31355       if test ! -x $JARSIGNER; then
31356         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31357 $as_echo "not found" >&6; }
31358         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31359 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31360         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31361       fi
31362       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31363 $as_echo "ok" >&6; }
31364 
31365 
31366     else
31367       # If it succeeded, then it was overridden by the user. We will use it
31368       # for the tool.
31369 
31370       # First remove it from the list of overridden variables, so we can test
31371       # for unknown variables in the end.
31372       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31373 
31374       # Check if we try to supply an empty value
31375       if test "x$JARSIGNER" = x; then
31376         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31377 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31378         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31379 $as_echo_n "checking for JARSIGNER... " >&6; }
31380         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31381 $as_echo "disabled" >&6; }
31382       else
31383         # Check if the provided tool contains a complete path.
31384         tool_specified="$JARSIGNER"
31385         tool_basename="${tool_specified##*/}"
31386         if test "x$tool_basename" = "x$tool_specified"; then
31387           # A command without a complete path is provided, search $PATH.
31388           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31389 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31390           # Extract the first word of "$tool_basename", so it can be a program name with args.
31391 set dummy $tool_basename; ac_word=$2
31392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31393 $as_echo_n "checking for $ac_word... " >&6; }
31394 if ${ac_cv_path_JARSIGNER+:} false; then :
31395   $as_echo_n "(cached) " >&6
31396 else
31397   case $JARSIGNER in
31398   [\\/]* | ?:[\\/]*)
31399   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31400   ;;
31401   *)
31402   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31403 for as_dir in $PATH
31404 do
31405   IFS=$as_save_IFS
31406   test -z "$as_dir" && as_dir=.
31407     for ac_exec_ext in '' $ac_executable_extensions; do
31408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31409     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31411     break 2
31412   fi
31413 done
31414   done
31415 IFS=$as_save_IFS
31416 
31417   ;;
31418 esac
31419 fi
31420 JARSIGNER=$ac_cv_path_JARSIGNER
31421 if test -n "$JARSIGNER"; then
31422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31423 $as_echo "$JARSIGNER" >&6; }
31424 else
31425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31426 $as_echo "no" >&6; }
31427 fi
31428 
31429 
31430           if test "x$JARSIGNER" = x; then
31431             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31432           fi
31433         else
31434           # Otherwise we believe it is a complete path. Use it as it is.
31435           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31436 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31437           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31438 $as_echo_n "checking for JARSIGNER... " >&6; }
31439           if test ! -x "$tool_specified"; then
31440             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31441 $as_echo "not found" >&6; }
31442             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31443           fi
31444           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31445 $as_echo "$tool_specified" >&6; }
31446         fi
31447       fi
31448     fi
31449 
31450   fi
31451 
31452 
31453 
31454   # Finally, set some other options...
31455 
31456   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31457   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31458 
31459 
31460   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31461 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
31462   if "$JAVA" --list-modules > /dev/null 2>&1; then
31463     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31464 $as_echo "yes" >&6; }
31465     BOOT_JDK_MODULAR="true"
31466   else
31467     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31468 $as_echo "no" >&6; }
31469     BOOT_JDK_MODULAR="false"
31470   fi
31471 
31472 
31473 
31474 
31475   # Check if the boot jdk is 32 or 64 bit
31476   if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31477     BOOT_JDK_BITS="64"
31478   else
31479     BOOT_JDK_BITS="32"
31480   fi
31481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31482 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31484 $as_echo "$BOOT_JDK_BITS" >&6; }
31485 
31486 
31487 
31488 # Check whether --with-build-jdk was given.
31489 if test "${with_build_jdk+set}" = set; then :
31490   withval=$with_build_jdk;
31491 fi
31492 
31493 
31494   CREATE_BUILDJDK=false
31495   EXTERNAL_BUILDJDK=false
31496   BUILD_JDK_FOUND="no"
31497   if test "x$with_build_jdk" != "x"; then
31498 
31499   if test "x$BUILD_JDK_FOUND" = xno; then
31500     # Execute the test
31501 
31502        if test "x$with_build_jdk" != x; then
31503          BUILD_JDK=$with_build_jdk
31504          BUILD_JDK_FOUND=maybe
31505          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31506 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31507        fi
31508 
31509     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31510     if test "x$BUILD_JDK_FOUND" = xmaybe; then
31511       # Do we have a bin/java?
31512       if test ! -x "$BUILD_JDK/bin/java"; then
31513         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31514 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31515         BUILD_JDK_FOUND=no
31516       elif test ! -x "$BUILD_JDK/bin/jlink"; then
31517         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31518 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31519         BUILD_JDK_FOUND=no
31520       elif test ! -x "$BUILD_JDK/bin/jmod"; then
31521         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31522 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31523         BUILD_JDK_FOUND=no
31524       elif test ! -x "$BUILD_JDK/bin/javac"; then
31525         # Do we have a bin/javac?
31526         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31527 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31528         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31529 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31530         BUILD_JDK_FOUND=no
31531       else
31532         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31533         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31534 
31535         # Extra M4 quote needed to protect [] in grep expression.
31536         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"'`
31537         if test "x$FOUND_CORRECT_VERSION" = x; then
31538           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31539 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31540           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 10)" >&5
31541 $as_echo "$as_me: (Your Build JDK must be version 10)" >&6;}
31542           BUILD_JDK_FOUND=no
31543         else
31544           # We're done!
31545           BUILD_JDK_FOUND=yes
31546 
31547   # Only process if variable expands to non-empty
31548 
31549   if test "x$BUILD_JDK" != x; then
31550     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31551 
31552   # Input might be given as Windows format, start by converting to
31553   # unix format.
31554   path="$BUILD_JDK"
31555   new_path=`$CYGPATH -u "$path"`
31556 
31557   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31558   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31559   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31560   # "foo.exe" is OK but "foo" is an error.
31561   #
31562   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31563   # It is also a way to make sure we got the proper file name for the real test later on.
31564   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31565   if test "x$test_shortpath" = x; then
31566     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31567 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31568     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31569   fi
31570 
31571   # Call helper function which possibly converts this using DOS-style short mode.
31572   # If so, the updated path is stored in $new_path.
31573 
31574   input_path="$new_path"
31575   # Check if we need to convert this using DOS-style short mode. If the path
31576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31577   # take no chances and rewrite it.
31578   # Note: m4 eats our [], so we need to use [ and ] instead.
31579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31580   if test "x$has_forbidden_chars" != x; then
31581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31585       # Going to short mode and back again did indeed matter. Since short mode is
31586       # case insensitive, let's make it lowercase to improve readability.
31587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31588       # Now convert it back to Unix-style (cygpath)
31589       input_path=`$CYGPATH -u "$shortmode_path"`
31590       new_path="$input_path"
31591     fi
31592   fi
31593 
31594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31595   if test "x$test_cygdrive_prefix" = x; then
31596     # As a simple fix, exclude /usr/bin since it's not a real path.
31597     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31599       # a path prefixed by /cygdrive for fixpath to work.
31600       new_path="$CYGWIN_ROOT_PATH$input_path"
31601     fi
31602   fi
31603 
31604 
31605   if test "x$path" != "x$new_path"; then
31606     BUILD_JDK="$new_path"
31607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31608 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31609   fi
31610 
31611     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31612 
31613   path="$BUILD_JDK"
31614   has_colon=`$ECHO $path | $GREP ^.:`
31615   new_path="$path"
31616   if test "x$has_colon" = x; then
31617     # Not in mixed or Windows style, start by that.
31618     new_path=`cmd //c echo $path`
31619   fi
31620 
31621 
31622   input_path="$new_path"
31623   # Check if we need to convert this using DOS-style short mode. If the path
31624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31625   # take no chances and rewrite it.
31626   # Note: m4 eats our [], so we need to use [ and ] instead.
31627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31628   if test "x$has_forbidden_chars" != x; then
31629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31630     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31631   fi
31632 
31633 
31634   windows_path="$new_path"
31635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31636     unix_path=`$CYGPATH -u "$windows_path"`
31637     new_path="$unix_path"
31638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31640     new_path="$unix_path"
31641   fi
31642 
31643   if test "x$path" != "x$new_path"; then
31644     BUILD_JDK="$new_path"
31645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31646 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31647   fi
31648 
31649   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31650   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31651 
31652     else
31653       # We're on a unix platform. Hooray! :)
31654       path="$BUILD_JDK"
31655       has_space=`$ECHO "$path" | $GREP " "`
31656       if test "x$has_space" != x; then
31657         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31658 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31659         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31660       fi
31661 
31662       # Use eval to expand a potential ~
31663       eval path="$path"
31664       if test ! -f "$path" && test ! -d "$path"; then
31665         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31666       fi
31667 
31668       if test -d "$path"; then
31669         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31670       else
31671         dir="`$DIRNAME "$path"`"
31672         base="`$BASENAME "$path"`"
31673         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31674       fi
31675     fi
31676   fi
31677 
31678           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31679 $as_echo_n "checking for Build JDK... " >&6; }
31680           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31681 $as_echo "$BUILD_JDK" >&6; }
31682           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31683 $as_echo_n "checking Build JDK version... " >&6; }
31684           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31685           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31686 $as_echo "$BUILD_JDK_VERSION" >&6; }
31687         fi # end check jdk version
31688       fi # end check java
31689     fi # end check build jdk found
31690   fi
31691 
31692     EXTERNAL_BUILDJDK=true
31693   else
31694     if test "x$COMPILE_TYPE" = "xcross"; then
31695       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31696       BUILD_JDK_FOUND=yes
31697       CREATE_BUILDJDK=true
31698       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31699 $as_echo_n "checking for Build JDK... " >&6; }
31700       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31701 $as_echo "yes, will build it for the host platform" >&6; }
31702     else
31703       BUILD_JDK="\$(JDK_OUTPUTDIR)"
31704       BUILD_JDK_FOUND=yes
31705       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31706 $as_echo_n "checking for Build JDK... " >&6; }
31707       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31708 $as_echo "yes, will use output dir" >&6; }
31709     fi
31710   fi
31711 
31712   JMOD="$BUILD_JDK/bin/jmod"
31713   JLINK="$BUILD_JDK/bin/jlink"
31714 
31715 
31716 
31717   if test "x$BUILD_JDK_FOUND" != "xyes"; then
31718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31719 $as_echo_n "checking for Build JDK... " >&6; }
31720     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31721 $as_echo "no" >&6; }
31722     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31723   fi
31724 
31725 
31726 
31727 
31728 
31729 
31730 ###############################################################################
31731 #
31732 # Configure the sources to use. We can add or override individual directories.
31733 #
31734 ###############################################################################
31735 
31736 
31737   OUTPUTDIR="$OUTPUTDIR"
31738 
31739   JDK_OUTPUTDIR="$OUTPUTDIR/jdk"
31740 
31741   # Where are the sources.
31742 
31743 
31744 
31745 
31746 # Check whether --with-import-modules was given.
31747 if test "${with_import_modules+set}" = set; then :
31748   withval=$with_import_modules;
31749 fi
31750 
31751 
31752   if test "x$with_import_modules" != x \
31753       && test "x$with_import_modules" != "xno"; then
31754     if test -d "$with_import_modules"; then
31755       IMPORT_MODULES_TOPDIR="$with_import_modules"
31756 
31757   # Only process if variable expands to non-empty
31758 
31759   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31760     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31761 
31762   # Input might be given as Windows format, start by converting to
31763   # unix format.
31764   path="$IMPORT_MODULES_TOPDIR"
31765   new_path=`$CYGPATH -u "$path"`
31766 
31767   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31768   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31769   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31770   # "foo.exe" is OK but "foo" is an error.
31771   #
31772   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31773   # It is also a way to make sure we got the proper file name for the real test later on.
31774   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31775   if test "x$test_shortpath" = x; then
31776     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31777 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31778     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31779   fi
31780 
31781   # Call helper function which possibly converts this using DOS-style short mode.
31782   # If so, the updated path is stored in $new_path.
31783 
31784   input_path="$new_path"
31785   # Check if we need to convert this using DOS-style short mode. If the path
31786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31787   # take no chances and rewrite it.
31788   # Note: m4 eats our [], so we need to use [ and ] instead.
31789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31790   if test "x$has_forbidden_chars" != x; then
31791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31792     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31793     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31794     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31795       # Going to short mode and back again did indeed matter. Since short mode is
31796       # case insensitive, let's make it lowercase to improve readability.
31797       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31798       # Now convert it back to Unix-style (cygpath)
31799       input_path=`$CYGPATH -u "$shortmode_path"`
31800       new_path="$input_path"
31801     fi
31802   fi
31803 
31804   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31805   if test "x$test_cygdrive_prefix" = x; then
31806     # As a simple fix, exclude /usr/bin since it's not a real path.
31807     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31808       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31809       # a path prefixed by /cygdrive for fixpath to work.
31810       new_path="$CYGWIN_ROOT_PATH$input_path"
31811     fi
31812   fi
31813 
31814 
31815   if test "x$path" != "x$new_path"; then
31816     IMPORT_MODULES_TOPDIR="$new_path"
31817     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31818 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31819   fi
31820 
31821     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31822 
31823   path="$IMPORT_MODULES_TOPDIR"
31824   has_colon=`$ECHO $path | $GREP ^.:`
31825   new_path="$path"
31826   if test "x$has_colon" = x; then
31827     # Not in mixed or Windows style, start by that.
31828     new_path=`cmd //c echo $path`
31829   fi
31830 
31831 
31832   input_path="$new_path"
31833   # Check if we need to convert this using DOS-style short mode. If the path
31834   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31835   # take no chances and rewrite it.
31836   # Note: m4 eats our [], so we need to use [ and ] instead.
31837   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31838   if test "x$has_forbidden_chars" != x; then
31839     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31840     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31841   fi
31842 
31843 
31844   windows_path="$new_path"
31845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31846     unix_path=`$CYGPATH -u "$windows_path"`
31847     new_path="$unix_path"
31848   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31849     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31850     new_path="$unix_path"
31851   fi
31852 
31853   if test "x$path" != "x$new_path"; then
31854     IMPORT_MODULES_TOPDIR="$new_path"
31855     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31856 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31857   fi
31858 
31859   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31860   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31861 
31862     else
31863       # We're on a unix platform. Hooray! :)
31864       path="$IMPORT_MODULES_TOPDIR"
31865       has_space=`$ECHO "$path" | $GREP " "`
31866       if test "x$has_space" != x; then
31867         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31868 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31869         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31870       fi
31871 
31872       # Use eval to expand a potential ~
31873       eval path="$path"
31874       if test ! -f "$path" && test ! -d "$path"; then
31875         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31876       fi
31877 
31878       if test -d "$path"; then
31879         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31880       else
31881         dir="`$DIRNAME "$path"`"
31882         base="`$BASENAME "$path"`"
31883         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31884       fi
31885     fi
31886   fi
31887 
31888     elif test -e "$with_import_modules"; then
31889       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31890       $RM -rf "$IMPORT_MODULES_TOPDIR"
31891       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31892       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31893         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31894       fi
31895     else
31896       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31897     fi
31898   fi
31899 
31900   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31901     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31902   fi
31903   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31904     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31905   fi
31906   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31907     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31908   fi
31909   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31910     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31911   fi
31912   if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31913     IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31914   fi
31915   if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31916     IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31917   fi
31918   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31919     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31920   fi
31921   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31922     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31923   fi
31924 
31925 
31926 
31927 
31928 
31929 
31930 
31931 
31932 
31933 
31934 
31935 ###############################################################################
31936 #
31937 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31938 # native code.
31939 #
31940 ###############################################################################
31941 
31942 # See if we are doing a complete static build or not
31943 
31944   # Check whether --enable-static-build was given.
31945 if test "${enable_static_build+set}" = set; then :
31946   enableval=$enable_static_build;
31947 fi
31948 
31949   STATIC_BUILD=false
31950   if test "x$enable_static_build" = "xyes"; then
31951     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31952 $as_echo_n "checking if static build is enabled... " >&6; }
31953     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31954 $as_echo "yes" >&6; }
31955     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31956       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31957     fi
31958     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31959     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31960     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31961     STATIC_BUILD=true
31962   elif test "x$enable_static_build" = "xno"; then
31963     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31964 $as_echo_n "checking if static build is enabled... " >&6; }
31965     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31966 $as_echo "no" >&6; }
31967   elif test "x$enable_static_build" != "x"; then
31968     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31969   fi
31970 
31971 
31972 
31973 
31974 # First determine the toolchain type (compiler family)
31975 
31976 
31977 # Check whether --with-toolchain-type was given.
31978 if test "${with_toolchain_type+set}" = set; then :
31979   withval=$with_toolchain_type;
31980 fi
31981 
31982 
31983   # Use indirect variable referencing
31984   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31985   VALID_TOOLCHAINS=${!toolchain_var_name}
31986 
31987   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31988     if test -n "$XCODEBUILD"; then
31989       # On Mac OS X, default toolchain to clang after Xcode 5
31990       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31991       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31992       if test $? -ne 0; then
31993         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31994       fi
31995       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31996           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31997           $CUT -f 1 -d .`
31998       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31999 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32000       if test $XCODE_MAJOR_VERSION -ge 5; then
32001           DEFAULT_TOOLCHAIN="clang"
32002       else
32003           DEFAULT_TOOLCHAIN="gcc"
32004       fi
32005     else
32006       # If Xcode is not installed, but the command line tools are
32007       # then we can't run xcodebuild. On these systems we should
32008       # default to clang
32009       DEFAULT_TOOLCHAIN="clang"
32010     fi
32011   else
32012     # First toolchain type in the list is the default
32013     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32014   fi
32015 
32016   if test "x$with_toolchain_type" = xlist; then
32017     # List all toolchains
32018     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32019 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32020     for toolchain in $VALID_TOOLCHAINS; do
32021       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32022       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32023       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32024     done
32025 
32026     exit 0
32027   elif test "x$with_toolchain_type" != x; then
32028     # User override; check that it is valid
32029     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32030       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32031 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32032       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32033 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32034       as_fn_error $? "Cannot continue." "$LINENO" 5
32035     fi
32036     TOOLCHAIN_TYPE=$with_toolchain_type
32037   else
32038     # No flag given, use default
32039     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32040   fi
32041 
32042 
32043   TOOLCHAIN_CC_BINARY_clang="clang"
32044   TOOLCHAIN_CC_BINARY_gcc="gcc"
32045   TOOLCHAIN_CC_BINARY_microsoft="cl"
32046   TOOLCHAIN_CC_BINARY_solstudio="cc"
32047   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32048 
32049   TOOLCHAIN_CXX_BINARY_clang="clang++"
32050   TOOLCHAIN_CXX_BINARY_gcc="g++"
32051   TOOLCHAIN_CXX_BINARY_microsoft="cl"
32052   TOOLCHAIN_CXX_BINARY_solstudio="CC"
32053   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32054 
32055   # Use indirect variable referencing
32056   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32057   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32058   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32059   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32060   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32061   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32062   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32063   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32064 
32065 
32066   # Define filename patterns
32067   if test "x$OPENJDK_TARGET_OS" = xwindows; then
32068     LIBRARY_PREFIX=
32069     SHARED_LIBRARY_SUFFIX='.dll'
32070     STATIC_LIBRARY_SUFFIX='.lib'
32071     SHARED_LIBRARY='$1.dll'
32072     STATIC_LIBRARY='$1.lib'
32073     OBJ_SUFFIX='.obj'
32074     EXE_SUFFIX='.exe'
32075   else
32076     LIBRARY_PREFIX=lib
32077     SHARED_LIBRARY_SUFFIX='.so'
32078     STATIC_LIBRARY_SUFFIX='.a'
32079     SHARED_LIBRARY='lib$1.so'
32080     STATIC_LIBRARY='lib$1.a'
32081     OBJ_SUFFIX='.o'
32082     EXE_SUFFIX=''
32083     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32084       # For full static builds, we're overloading the SHARED_LIBRARY
32085       # variables in order to limit the amount of changes required.
32086       # It would be better to remove SHARED and just use LIBRARY and
32087       # LIBRARY_SUFFIX for libraries that can be built either
32088       # shared or static and use STATIC_* for libraries that are
32089       # always built statically.
32090       if test "x$STATIC_BUILD" = xtrue; then
32091         SHARED_LIBRARY='lib$1.a'
32092         SHARED_LIBRARY_SUFFIX='.a'
32093       else
32094         SHARED_LIBRARY='lib$1.dylib'
32095         SHARED_LIBRARY_SUFFIX='.dylib'
32096       fi
32097     fi
32098   fi
32099 
32100 
32101 
32102 
32103 
32104 
32105 
32106 
32107 
32108 
32109   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32110     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32111 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32112   else
32113     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32114 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32115   fi
32116 
32117 
32118 # User supplied flags should be used when configure detects compilers
32119 
32120   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32121     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32122 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32123   fi
32124 
32125   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32126     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32127 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32128   fi
32129 
32130   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32131     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32132 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32133   fi
32134 
32135 
32136 # Check whether --with-extra-cflags was given.
32137 if test "${with_extra_cflags+set}" = set; then :
32138   withval=$with_extra_cflags;
32139 fi
32140 
32141 
32142 
32143 # Check whether --with-extra-cxxflags was given.
32144 if test "${with_extra_cxxflags+set}" = set; then :
32145   withval=$with_extra_cxxflags;
32146 fi
32147 
32148 
32149 
32150 # Check whether --with-extra-ldflags was given.
32151 if test "${with_extra_ldflags+set}" = set; then :
32152   withval=$with_extra_ldflags;
32153 fi
32154 
32155 
32156   EXTRA_CFLAGS="$with_extra_cflags"
32157   EXTRA_CXXFLAGS="$with_extra_cxxflags"
32158   EXTRA_LDFLAGS="$with_extra_ldflags"
32159 
32160 
32161 
32162 
32163 
32164   # The global CFLAGS and LDLAGS variables are used by configure tests and
32165   # should include the extra parameters
32166   CFLAGS="$EXTRA_CFLAGS"
32167   CXXFLAGS="$EXTRA_CXXFLAGS"
32168   LDFLAGS="$EXTRA_LDFLAGS"
32169   CPPFLAGS=""
32170 
32171 # The sysroot cflags are needed for configure to be able to run the compilers
32172 
32173   if test "x$SYSROOT" != "x"; then
32174     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32175       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32176         # Solaris Studio does not have a concept of sysroot. Instead we must
32177         # make sure the default include and lib dirs are appended to each
32178         # compile and link command line. Must also add -I-xbuiltin to enable
32179         # inlining of system functions and intrinsics.
32180         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32181         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32182             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32183       fi
32184     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32185       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32186       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32187     elif test "x$TOOLCHAIN_TYPE" = xclang; then
32188       SYSROOT_CFLAGS="-isysroot $SYSROOT"
32189       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32190     fi
32191     # The global CFLAGS and LDFLAGS variables need these for configure to function
32192     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32193     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32194     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32195     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32196   fi
32197 
32198   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32199     # We also need -iframework<path>/System/Library/Frameworks
32200     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32201     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32202     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32203     # set this here so it doesn't have to be peppered throughout the forest
32204     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32205     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32206   fi
32207 
32208 
32209 
32210 
32211 
32212 # Then detect the actual binaries needed
32213 
32214   # FIXME: Is this needed?
32215   ac_ext=cpp
32216 ac_cpp='$CXXCPP $CPPFLAGS'
32217 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32218 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32219 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32220 
32221 
32222   # Store the CFLAGS etc passed to the configure script.
32223   ORG_CFLAGS="$CFLAGS"
32224   ORG_CXXFLAGS="$CXXFLAGS"
32225 
32226   # autoconf magic only relies on PATH, so update it if tools dir is specified
32227   OLD_PATH="$PATH"
32228 
32229   # On Windows, we need to detect the visual studio installation first.
32230   # This will change the PATH, but we need to keep that new PATH even
32231   # after toolchain detection is done, since the compiler (on x86) uses
32232   # it for DLL resolution in runtime.
32233   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32234       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32235 
32236   # Store path to cygwin link.exe to help excluding it when searching for
32237   # VS linker. This must be done before changing the PATH when looking for VS.
32238   # Extract the first word of "link", so it can be a program name with args.
32239 set dummy link; ac_word=$2
32240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32241 $as_echo_n "checking for $ac_word... " >&6; }
32242 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32243   $as_echo_n "(cached) " >&6
32244 else
32245   case $CYGWIN_LINK in
32246   [\\/]* | ?:[\\/]*)
32247   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32248   ;;
32249   *)
32250   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32251 for as_dir in $PATH
32252 do
32253   IFS=$as_save_IFS
32254   test -z "$as_dir" && as_dir=.
32255     for ac_exec_ext in '' $ac_executable_extensions; do
32256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32257     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32259     break 2
32260   fi
32261 done
32262   done
32263 IFS=$as_save_IFS
32264 
32265   ;;
32266 esac
32267 fi
32268 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32269 if test -n "$CYGWIN_LINK"; then
32270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32271 $as_echo "$CYGWIN_LINK" >&6; }
32272 else
32273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32274 $as_echo "no" >&6; }
32275 fi
32276 
32277 
32278   if test "x$CYGWIN_LINK" != x; then
32279     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32280 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32281     "$CYGWIN_LINK" --version > /dev/null
32282     if test $? -eq 0 ; then
32283       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32284 $as_echo "yes" >&6; }
32285     else
32286       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32287 $as_echo "no" >&6; }
32288       # This might be the VS linker. Don't exclude it later on.
32289       CYGWIN_LINK=""
32290     fi
32291   fi
32292 
32293   # First-hand choice is to locate and run the vsvars bat file.
32294 
32295 
32296 # Check whether --with-toolchain-version was given.
32297 if test "${with_toolchain_version+set}" = set; then :
32298   withval=$with_toolchain_version;
32299 fi
32300 
32301 
32302   if test "x$with_toolchain_version" = xlist; then
32303     # List all toolchains
32304     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32305 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32306     for version in $VALID_VS_VERSIONS; do
32307       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32308       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32309     done
32310 
32311     exit 0
32312   elif test "x$DEVKIT_VS_VERSION" != x; then
32313     VS_VERSION=$DEVKIT_VS_VERSION
32314     TOOLCHAIN_VERSION=$VS_VERSION
32315     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32316     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32317     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32318     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32319     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32320     VS_PATH="$TOOLCHAIN_PATH:$PATH"
32321 
32322     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32323     # can still be exported as INCLUDE for compiler invocations without
32324     # SYSROOT_CFLAGS
32325     OLDIFS="$IFS"
32326     IFS=";"
32327     for i in $DEVKIT_VS_INCLUDE; do
32328       ipath=$i
32329 
32330   unix_path="$ipath"
32331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32332     windows_path=`$CYGPATH -m "$unix_path"`
32333     ipath="$windows_path"
32334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32335     windows_path=`cmd //c echo $unix_path`
32336     ipath="$windows_path"
32337   fi
32338 
32339       VS_INCLUDE="$VS_INCLUDE;$ipath"
32340     done
32341     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32342     # as LIB for compiler invocations without SYSROOT_LDFLAGS
32343     for i in $DEVKIT_VS_LIB; do
32344       libpath=$i
32345 
32346   unix_path="$libpath"
32347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32348     windows_path=`$CYGPATH -m "$unix_path"`
32349     libpath="$windows_path"
32350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32351     windows_path=`cmd //c echo $unix_path`
32352     libpath="$windows_path"
32353   fi
32354 
32355       VS_LIB="$VS_LIB;$libpath"
32356     done
32357     IFS="$OLDIFS"
32358 
32359     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32360 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32361 
32362   elif test "x$with_toolchain_version" != x; then
32363     # User override; check that it is valid
32364     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32365       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32366 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32367       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32368 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32369       as_fn_error $? "Cannot continue." "$LINENO" 5
32370     fi
32371     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32372   else
32373     # No flag given, use default
32374     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32375   fi
32376 
32377   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32378 
32379   VS_VERSION="$VS_VERSION"
32380   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32381   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32382   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32383   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32384 
32385   # When using --with-tools-dir, assume it points to the correct and default
32386   # version of Visual Studio or that --with-toolchain-version was also set.
32387   if test "x$with_tools_dir" != x; then
32388 
32389   if test "x$VS_ENV_CMD" = x; then
32390     VS_VERSION="${VS_VERSION}"
32391     VS_BASE="$with_tools_dir/../.."
32392     METHOD="--with-tools-dir"
32393 
32394     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32395       VCVARSFILE="vc/bin/vcvars32.bat"
32396     else
32397       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32398     fi
32399 
32400 
32401   windows_path="$VS_BASE"
32402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32403     unix_path=`$CYGPATH -u "$windows_path"`
32404     VS_BASE="$unix_path"
32405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32407     VS_BASE="$unix_path"
32408   fi
32409 
32410     if test -d "$VS_BASE"; then
32411       if test -f "$VS_BASE/$VCVARSFILE"; then
32412         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32413 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32414         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32415         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32416         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32417         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32418       else
32419         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32420 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32421         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32422 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32423       fi
32424     fi
32425   fi
32426 
32427 
32428   if test "x$VS_ENV_CMD" = x; then
32429     VS_VERSION="${VS_VERSION}"
32430     VS_BASE="$with_tools_dir/../../.."
32431     METHOD="--with-tools-dir"
32432 
32433     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32434       VCVARSFILE="vc/bin/vcvars32.bat"
32435     else
32436       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32437     fi
32438 
32439 
32440   windows_path="$VS_BASE"
32441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32442     unix_path=`$CYGPATH -u "$windows_path"`
32443     VS_BASE="$unix_path"
32444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32445     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32446     VS_BASE="$unix_path"
32447   fi
32448 
32449     if test -d "$VS_BASE"; then
32450       if test -f "$VS_BASE/$VCVARSFILE"; then
32451         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32452 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32453         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32454         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32455         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32456         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32457       else
32458         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32459 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32460         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32461 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32462       fi
32463     fi
32464   fi
32465 
32466     if test "x$VS_ENV_CMD" = x; then
32467       # Having specified an argument which is incorrect will produce an instant failure;
32468       # we should not go on looking
32469       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32470 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32471       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32472 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32473       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32474 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32475       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32476     fi
32477   fi
32478 
32479   VS_ENV_CMD=""
32480   VS_ENV_ARGS=""
32481 
32482   if test "x$VS_COMNTOOLS" != x; then
32483 
32484   if test "x$VS_ENV_CMD" = x; then
32485     VS_VERSION="${VS_VERSION}"
32486     VS_BASE="$VS_COMNTOOLS/../.."
32487     METHOD="$VS_COMNTOOLS_VAR variable"
32488 
32489     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32490       VCVARSFILE="vc/bin/vcvars32.bat"
32491     else
32492       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32493     fi
32494 
32495 
32496   windows_path="$VS_BASE"
32497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32498     unix_path=`$CYGPATH -u "$windows_path"`
32499     VS_BASE="$unix_path"
32500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32502     VS_BASE="$unix_path"
32503   fi
32504 
32505     if test -d "$VS_BASE"; then
32506       if test -f "$VS_BASE/$VCVARSFILE"; then
32507         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32508 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32509         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32510         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32511         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32512         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32513       else
32514         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32515 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32516         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32517 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32518       fi
32519     fi
32520   fi
32521 
32522   fi
32523   if test "x$PROGRAMFILES" != x; then
32524 
32525   if test "x$VS_ENV_CMD" = x; then
32526     VS_VERSION="${VS_VERSION}"
32527     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32528     METHOD="well-known name"
32529 
32530     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32531       VCVARSFILE="vc/bin/vcvars32.bat"
32532     else
32533       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32534     fi
32535 
32536 
32537   windows_path="$VS_BASE"
32538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32539     unix_path=`$CYGPATH -u "$windows_path"`
32540     VS_BASE="$unix_path"
32541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32543     VS_BASE="$unix_path"
32544   fi
32545 
32546     if test -d "$VS_BASE"; then
32547       if test -f "$VS_BASE/$VCVARSFILE"; then
32548         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32549 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32550         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32551         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32552         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32553         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32554       else
32555         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32556 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32557         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32558 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32559       fi
32560     fi
32561   fi
32562 
32563   fi
32564   # Work around the insanely named ProgramFiles(x86) env variable
32565   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32566   if test "x$PROGRAMFILES_X86" != x; then
32567 
32568   if test "x$VS_ENV_CMD" = x; then
32569     VS_VERSION="${VS_VERSION}"
32570     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32571     METHOD="well-known name"
32572 
32573     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32574       VCVARSFILE="vc/bin/vcvars32.bat"
32575     else
32576       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32577     fi
32578 
32579 
32580   windows_path="$VS_BASE"
32581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32582     unix_path=`$CYGPATH -u "$windows_path"`
32583     VS_BASE="$unix_path"
32584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32586     VS_BASE="$unix_path"
32587   fi
32588 
32589     if test -d "$VS_BASE"; then
32590       if test -f "$VS_BASE/$VCVARSFILE"; then
32591         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32592 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32593         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32594         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32595         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32596         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32597       else
32598         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32599 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32600         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32601 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32602       fi
32603     fi
32604   fi
32605 
32606   fi
32607 
32608   if test "x$VS_ENV_CMD" = x; then
32609     VS_VERSION="${VS_VERSION}"
32610     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32611     METHOD="well-known name"
32612 
32613     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32614       VCVARSFILE="vc/bin/vcvars32.bat"
32615     else
32616       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32617     fi
32618 
32619 
32620   windows_path="$VS_BASE"
32621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32622     unix_path=`$CYGPATH -u "$windows_path"`
32623     VS_BASE="$unix_path"
32624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32626     VS_BASE="$unix_path"
32627   fi
32628 
32629     if test -d "$VS_BASE"; then
32630       if test -f "$VS_BASE/$VCVARSFILE"; then
32631         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32632 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32633         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32634         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32635         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32636         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32637       else
32638         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32639 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32640         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32641 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32642       fi
32643     fi
32644   fi
32645 
32646 
32647   if test "x$VS_ENV_CMD" = x; then
32648     VS_VERSION="${VS_VERSION}"
32649     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32650     METHOD="well-known name"
32651 
32652     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32653       VCVARSFILE="vc/bin/vcvars32.bat"
32654     else
32655       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32656     fi
32657 
32658 
32659   windows_path="$VS_BASE"
32660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32661     unix_path=`$CYGPATH -u "$windows_path"`
32662     VS_BASE="$unix_path"
32663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32665     VS_BASE="$unix_path"
32666   fi
32667 
32668     if test -d "$VS_BASE"; then
32669       if test -f "$VS_BASE/$VCVARSFILE"; then
32670         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32671 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32672         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32673         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32674         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32675         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32676       else
32677         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32678 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32679         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32680 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32681       fi
32682     fi
32683   fi
32684 
32685 
32686   if test "x$SDK_INSTALL_DIR" != x; then
32687     if test "x$ProgramW6432" != x; then
32688 
32689   if test "x$VS_ENV_CMD" = x; then
32690     VS_VERSION="${VS_VERSION}"
32691     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32692     METHOD="well-known name"
32693 
32694   windows_path="$WIN_SDK_BASE"
32695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32696     unix_path=`$CYGPATH -u "$windows_path"`
32697     WIN_SDK_BASE="$unix_path"
32698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32700     WIN_SDK_BASE="$unix_path"
32701   fi
32702 
32703     if test -d "$WIN_SDK_BASE"; then
32704       # There have been cases of partial or broken SDK installations. A missing
32705       # lib dir is not going to work.
32706       if test ! -d "$WIN_SDK_BASE/lib"; then
32707         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32708 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32709         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32710 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32711       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32712         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32713 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32714         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32715         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32716           VS_ENV_ARGS="/x86"
32717         else
32718           VS_ENV_ARGS="/x64"
32719         fi
32720         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32721         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32722         # TODO: improve detection for other versions of SDK
32723         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32724       else
32725         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32726 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32727         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32728 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32729       fi
32730     fi
32731   fi
32732 
32733     fi
32734     if test "x$PROGRAMW6432" != x; then
32735 
32736   if test "x$VS_ENV_CMD" = x; then
32737     VS_VERSION="${VS_VERSION}"
32738     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32739     METHOD="well-known name"
32740 
32741   windows_path="$WIN_SDK_BASE"
32742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32743     unix_path=`$CYGPATH -u "$windows_path"`
32744     WIN_SDK_BASE="$unix_path"
32745   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32746     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32747     WIN_SDK_BASE="$unix_path"
32748   fi
32749 
32750     if test -d "$WIN_SDK_BASE"; then
32751       # There have been cases of partial or broken SDK installations. A missing
32752       # lib dir is not going to work.
32753       if test ! -d "$WIN_SDK_BASE/lib"; then
32754         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32755 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32756         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32757 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32758       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32759         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32760 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32761         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32762         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32763           VS_ENV_ARGS="/x86"
32764         else
32765           VS_ENV_ARGS="/x64"
32766         fi
32767         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32768         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32769         # TODO: improve detection for other versions of SDK
32770         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32771       else
32772         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32773 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32774         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32775 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32776       fi
32777     fi
32778   fi
32779 
32780     fi
32781     if test "x$PROGRAMFILES" != x; then
32782 
32783   if test "x$VS_ENV_CMD" = x; then
32784     VS_VERSION="${VS_VERSION}"
32785     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32786     METHOD="well-known name"
32787 
32788   windows_path="$WIN_SDK_BASE"
32789   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32790     unix_path=`$CYGPATH -u "$windows_path"`
32791     WIN_SDK_BASE="$unix_path"
32792   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32793     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32794     WIN_SDK_BASE="$unix_path"
32795   fi
32796 
32797     if test -d "$WIN_SDK_BASE"; then
32798       # There have been cases of partial or broken SDK installations. A missing
32799       # lib dir is not going to work.
32800       if test ! -d "$WIN_SDK_BASE/lib"; then
32801         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32802 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32803         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32804 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32805       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32806         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32807 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32808         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32809         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32810           VS_ENV_ARGS="/x86"
32811         else
32812           VS_ENV_ARGS="/x64"
32813         fi
32814         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32815         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32816         # TODO: improve detection for other versions of SDK
32817         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32818       else
32819         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32820 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32821         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32822 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32823       fi
32824     fi
32825   fi
32826 
32827     fi
32828 
32829   if test "x$VS_ENV_CMD" = x; then
32830     VS_VERSION="${VS_VERSION}"
32831     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32832     METHOD="well-known name"
32833 
32834   windows_path="$WIN_SDK_BASE"
32835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32836     unix_path=`$CYGPATH -u "$windows_path"`
32837     WIN_SDK_BASE="$unix_path"
32838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32840     WIN_SDK_BASE="$unix_path"
32841   fi
32842 
32843     if test -d "$WIN_SDK_BASE"; then
32844       # There have been cases of partial or broken SDK installations. A missing
32845       # lib dir is not going to work.
32846       if test ! -d "$WIN_SDK_BASE/lib"; then
32847         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32848 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32849         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32850 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32851       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32852         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32853 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32854         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32855         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32856           VS_ENV_ARGS="/x86"
32857         else
32858           VS_ENV_ARGS="/x64"
32859         fi
32860         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32861         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32862         # TODO: improve detection for other versions of SDK
32863         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32864       else
32865         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32866 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32867         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32868 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32869       fi
32870     fi
32871   fi
32872 
32873 
32874   if test "x$VS_ENV_CMD" = x; then
32875     VS_VERSION="${VS_VERSION}"
32876     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32877     METHOD="well-known name"
32878 
32879   windows_path="$WIN_SDK_BASE"
32880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32881     unix_path=`$CYGPATH -u "$windows_path"`
32882     WIN_SDK_BASE="$unix_path"
32883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32885     WIN_SDK_BASE="$unix_path"
32886   fi
32887 
32888     if test -d "$WIN_SDK_BASE"; then
32889       # There have been cases of partial or broken SDK installations. A missing
32890       # lib dir is not going to work.
32891       if test ! -d "$WIN_SDK_BASE/lib"; then
32892         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32893 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32894         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32895 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32896       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32897         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32898 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32899         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32900         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32901           VS_ENV_ARGS="/x86"
32902         else
32903           VS_ENV_ARGS="/x64"
32904         fi
32905         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32906         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32907         # TODO: improve detection for other versions of SDK
32908         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32909       else
32910         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32911 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32912         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32913 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32914       fi
32915     fi
32916   fi
32917 
32918   fi
32919 
32920     if test "x$VS_ENV_CMD" != x; then
32921       TOOLCHAIN_VERSION=$VS_VERSION
32922       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32923       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32924       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32925       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32926       # The rest of the variables are already evaled while probing
32927       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32928 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32929       break
32930     fi
32931   done
32932 
32933 
32934   # If we have a devkit, skip all of the below.
32935   if test "x$DEVKIT_VS_VERSION" = x; then
32936     if test "x$VS_ENV_CMD" != x; then
32937       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32938 
32939   # Only process if variable expands to non-empty
32940 
32941   if test "x$VS_ENV_CMD" != x; then
32942     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32943 
32944   # First separate the path from the arguments. This will split at the first
32945   # space.
32946   complete="$VS_ENV_CMD"
32947   path="${complete%% *}"
32948   tmp="$complete EOL"
32949   arguments="${tmp#* }"
32950 
32951   # Input might be given as Windows format, start by converting to
32952   # unix format.
32953   new_path=`$CYGPATH -u "$path"`
32954 
32955   # Now try to locate executable using which
32956   new_path=`$WHICH "$new_path" 2> /dev/null`
32957   # bat and cmd files are not always considered executable in cygwin causing which
32958   # to not find them
32959   if test "x$new_path" = x \
32960       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32961       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32962     new_path=`$CYGPATH -u "$path"`
32963   fi
32964   if test "x$new_path" = x; then
32965     # Oops. Which didn't find the executable.
32966     # The splitting of arguments from the executable at a space might have been incorrect,
32967     # since paths with space are more likely in Windows. Give it another try with the whole
32968     # argument.
32969     path="$complete"
32970     arguments="EOL"
32971     new_path=`$CYGPATH -u "$path"`
32972     new_path=`$WHICH "$new_path" 2> /dev/null`
32973     # bat and cmd files are not always considered executable in cygwin causing which
32974     # to not find them
32975     if test "x$new_path" = x \
32976         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32977         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32978       new_path=`$CYGPATH -u "$path"`
32979     fi
32980     if test "x$new_path" = x; then
32981       # It's still not found. Now this is an unrecoverable error.
32982       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32983 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32984       has_space=`$ECHO "$complete" | $GREP " "`
32985       if test "x$has_space" != x; then
32986         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32987 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32988       fi
32989       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32990     fi
32991   fi
32992 
32993   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32994   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32995   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32996   # "foo.exe" is OK but "foo" is an error.
32997   #
32998   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32999   # It is also a way to make sure we got the proper file name for the real test later on.
33000   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33001   if test "x$test_shortpath" = x; then
33002     # Short path failed, file does not exist as specified.
33003     # Try adding .exe or .cmd
33004     if test -f "${new_path}.exe"; then
33005       input_to_shortpath="${new_path}.exe"
33006     elif test -f "${new_path}.cmd"; then
33007       input_to_shortpath="${new_path}.cmd"
33008     else
33009       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33010 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33011       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33012 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33013       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33014     fi
33015   else
33016     input_to_shortpath="$new_path"
33017   fi
33018 
33019   # Call helper function which possibly converts this using DOS-style short mode.
33020   # If so, the updated path is stored in $new_path.
33021   new_path="$input_to_shortpath"
33022 
33023   input_path="$input_to_shortpath"
33024   # Check if we need to convert this using DOS-style short mode. If the path
33025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33026   # take no chances and rewrite it.
33027   # Note: m4 eats our [], so we need to use [ and ] instead.
33028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33029   if test "x$has_forbidden_chars" != x; then
33030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33031     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33032     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33033     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33034       # Going to short mode and back again did indeed matter. Since short mode is
33035       # case insensitive, let's make it lowercase to improve readability.
33036       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33037       # Now convert it back to Unix-style (cygpath)
33038       input_path=`$CYGPATH -u "$shortmode_path"`
33039       new_path="$input_path"
33040     fi
33041   fi
33042 
33043   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33044   if test "x$test_cygdrive_prefix" = x; then
33045     # As a simple fix, exclude /usr/bin since it's not a real path.
33046     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33047       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33048       # a path prefixed by /cygdrive for fixpath to work.
33049       new_path="$CYGWIN_ROOT_PATH$input_path"
33050     fi
33051   fi
33052 
33053   # remove trailing .exe if any
33054   new_path="${new_path/%.exe/}"
33055 
33056     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33057 
33058   # First separate the path from the arguments. This will split at the first
33059   # space.
33060   complete="$VS_ENV_CMD"
33061   path="${complete%% *}"
33062   tmp="$complete EOL"
33063   arguments="${tmp#* }"
33064 
33065   # Input might be given as Windows format, start by converting to
33066   # unix format.
33067   new_path="$path"
33068 
33069   windows_path="$new_path"
33070   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33071     unix_path=`$CYGPATH -u "$windows_path"`
33072     new_path="$unix_path"
33073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33074     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33075     new_path="$unix_path"
33076   fi
33077 
33078 
33079   # Now try to locate executable using which
33080   new_path=`$WHICH "$new_path" 2> /dev/null`
33081 
33082   if test "x$new_path" = x; then
33083     # Oops. Which didn't find the executable.
33084     # The splitting of arguments from the executable at a space might have been incorrect,
33085     # since paths with space are more likely in Windows. Give it another try with the whole
33086     # argument.
33087     path="$complete"
33088     arguments="EOL"
33089     new_path="$path"
33090 
33091   windows_path="$new_path"
33092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33093     unix_path=`$CYGPATH -u "$windows_path"`
33094     new_path="$unix_path"
33095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33097     new_path="$unix_path"
33098   fi
33099 
33100 
33101     new_path=`$WHICH "$new_path" 2> /dev/null`
33102     # bat and cmd files are not always considered executable in MSYS causing which
33103     # to not find them
33104     if test "x$new_path" = x \
33105         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33106         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33107       new_path="$path"
33108 
33109   windows_path="$new_path"
33110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33111     unix_path=`$CYGPATH -u "$windows_path"`
33112     new_path="$unix_path"
33113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33115     new_path="$unix_path"
33116   fi
33117 
33118     fi
33119 
33120     if test "x$new_path" = x; then
33121       # It's still not found. Now this is an unrecoverable error.
33122       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33123 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33124       has_space=`$ECHO "$complete" | $GREP " "`
33125       if test "x$has_space" != x; then
33126         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33127 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33128       fi
33129       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33130     fi
33131   fi
33132 
33133   # Now new_path has a complete unix path to the binary
33134   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33135     # Keep paths in /bin as-is, but remove trailing .exe if any
33136     new_path="${new_path/%.exe/}"
33137     # Do not save /bin paths to all_fixpath_prefixes!
33138   else
33139     # Not in mixed or Windows style, start by that.
33140     new_path=`cmd //c echo $new_path`
33141 
33142   input_path="$new_path"
33143   # Check if we need to convert this using DOS-style short mode. If the path
33144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33145   # take no chances and rewrite it.
33146   # Note: m4 eats our [], so we need to use [ and ] instead.
33147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33148   if test "x$has_forbidden_chars" != x; then
33149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33150     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33151   fi
33152 
33153     # Output is in $new_path
33154 
33155   windows_path="$new_path"
33156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33157     unix_path=`$CYGPATH -u "$windows_path"`
33158     new_path="$unix_path"
33159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33161     new_path="$unix_path"
33162   fi
33163 
33164     # remove trailing .exe if any
33165     new_path="${new_path/%.exe/}"
33166 
33167     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33168     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33169   fi
33170 
33171     else
33172       # We're on a unix platform. Hooray! :)
33173       # First separate the path from the arguments. This will split at the first
33174       # space.
33175       complete="$VS_ENV_CMD"
33176       path="${complete%% *}"
33177       tmp="$complete EOL"
33178       arguments="${tmp#* }"
33179 
33180       # Cannot rely on the command "which" here since it doesn't always work.
33181       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33182       if test -z "$is_absolute_path"; then
33183         # Path to executable is not absolute. Find it.
33184         IFS_save="$IFS"
33185         IFS=:
33186         for p in $PATH; do
33187           if test -f "$p/$path" && test -x "$p/$path"; then
33188             new_path="$p/$path"
33189             break
33190           fi
33191         done
33192         IFS="$IFS_save"
33193       else
33194         # This is an absolute path, we can use it without further modifications.
33195         new_path="$path"
33196       fi
33197 
33198       if test "x$new_path" = x; then
33199         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33200 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33201         has_space=`$ECHO "$complete" | $GREP " "`
33202         if test "x$has_space" != x; then
33203           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33204 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33205         fi
33206         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33207       fi
33208     fi
33209 
33210     # Now join together the path and the arguments once again
33211     if test "x$arguments" != xEOL; then
33212       new_complete="$new_path ${arguments% *}"
33213     else
33214       new_complete="$new_path"
33215     fi
33216 
33217     if test "x$complete" != "x$new_complete"; then
33218       VS_ENV_CMD="$new_complete"
33219       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33220 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33221     fi
33222   fi
33223 
33224 
33225       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33226       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33227 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33228 
33229       # We need to create a couple of temporary files.
33230       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33231       $MKDIR -p $VS_ENV_TMP_DIR
33232 
33233       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33234       # Instead create a shell script which will set the relevant variables when run.
33235       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33236 
33237   unix_path="$WINPATH_VS_ENV_CMD"
33238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33239     windows_path=`$CYGPATH -m "$unix_path"`
33240     WINPATH_VS_ENV_CMD="$windows_path"
33241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33242     windows_path=`cmd //c echo $unix_path`
33243     WINPATH_VS_ENV_CMD="$windows_path"
33244   fi
33245 
33246       WINPATH_BASH="$BASH"
33247 
33248   unix_path="$WINPATH_BASH"
33249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33250     windows_path=`$CYGPATH -m "$unix_path"`
33251     WINPATH_BASH="$windows_path"
33252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33253     windows_path=`cmd //c echo $unix_path`
33254     WINPATH_BASH="$windows_path"
33255   fi
33256 
33257 
33258       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33259       # script (executable by bash) that will setup the important variables.
33260       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33261       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33262       # This will end up something like:
33263       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33264       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33265       # These will end up something like:
33266       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33267       # The trailing space for everyone except PATH is no typo, but is needed due
33268       # to trailing \ in the Windows paths. These will be stripped later.
33269       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33270           >> $EXTRACT_VC_ENV_BAT_FILE
33271       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33272           >> $EXTRACT_VC_ENV_BAT_FILE
33273       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33274           >> $EXTRACT_VC_ENV_BAT_FILE
33275       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33276           >> $EXTRACT_VC_ENV_BAT_FILE
33277       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33278           >> $EXTRACT_VC_ENV_BAT_FILE
33279       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33280           >> $EXTRACT_VC_ENV_BAT_FILE
33281 
33282       # Now execute the newly created bat file.
33283       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33284       # Change directory so we don't need to mess with Windows paths in redirects.
33285       cd $VS_ENV_TMP_DIR
33286       cmd /c extract-vs-env.bat | $CAT
33287       cd $CURDIR
33288 
33289       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33290         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33291 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33292         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33293 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33294         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33295 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33296         as_fn_error $? "Cannot continue" "$LINENO" 5
33297       fi
33298 
33299       # Now set all paths and other env variables. This will allow the rest of
33300       # the configure script to find and run the compiler in the proper way.
33301       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33302 $as_echo "$as_me: Setting extracted environment variables" >&6;}
33303       . $VS_ENV_TMP_DIR/set-vs-env.sh
33304       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33305       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33306     else
33307       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33308       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33309 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33310     fi
33311   fi
33312 
33313   # At this point, we should have correct variables in the environment, or we can't continue.
33314   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33315 $as_echo_n "checking for Visual Studio variables... " >&6; }
33316 
33317   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33318       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33319     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33320       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33321 $as_echo "present but broken" >&6; }
33322       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33323     else
33324       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33325 $as_echo "ok" >&6; }
33326       # Remove any trailing "\" ";" and " " from the variables.
33327       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33328       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33329       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33330       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33331       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33332       # Remove any paths containing # (typically F#) as that messes up make. This
33333       # is needed if visual studio was installed with F# support.
33334       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33335 
33336 
33337 
33338 
33339 
33340       # Convert VS_INCLUDE into SYSROOT_CFLAGS
33341       OLDIFS="$IFS"
33342       IFS=";"
33343       for i in $VS_INCLUDE; do
33344         ipath=$i
33345         # Only process non-empty elements
33346         if test "x$ipath" != x; then
33347           IFS="$OLDIFS"
33348           # Check that directory exists before calling fixup_path
33349           testpath=$ipath
33350 
33351   windows_path="$testpath"
33352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33353     unix_path=`$CYGPATH -u "$windows_path"`
33354     testpath="$unix_path"
33355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33357     testpath="$unix_path"
33358   fi
33359 
33360           if test -d "$testpath"; then
33361 
33362   # Only process if variable expands to non-empty
33363 
33364   if test "x$ipath" != x; then
33365     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33366 
33367   # Input might be given as Windows format, start by converting to
33368   # unix format.
33369   path="$ipath"
33370   new_path=`$CYGPATH -u "$path"`
33371 
33372   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33373   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33374   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33375   # "foo.exe" is OK but "foo" is an error.
33376   #
33377   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33378   # It is also a way to make sure we got the proper file name for the real test later on.
33379   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33380   if test "x$test_shortpath" = x; then
33381     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33382 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33383     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33384   fi
33385 
33386   # Call helper function which possibly converts this using DOS-style short mode.
33387   # If so, the updated path is stored in $new_path.
33388 
33389   input_path="$new_path"
33390   # Check if we need to convert this using DOS-style short mode. If the path
33391   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33392   # take no chances and rewrite it.
33393   # Note: m4 eats our [], so we need to use [ and ] instead.
33394   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33395   if test "x$has_forbidden_chars" != x; then
33396     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33397     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33398     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33399     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33400       # Going to short mode and back again did indeed matter. Since short mode is
33401       # case insensitive, let's make it lowercase to improve readability.
33402       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33403       # Now convert it back to Unix-style (cygpath)
33404       input_path=`$CYGPATH -u "$shortmode_path"`
33405       new_path="$input_path"
33406     fi
33407   fi
33408 
33409   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33410   if test "x$test_cygdrive_prefix" = x; then
33411     # As a simple fix, exclude /usr/bin since it's not a real path.
33412     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33413       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33414       # a path prefixed by /cygdrive for fixpath to work.
33415       new_path="$CYGWIN_ROOT_PATH$input_path"
33416     fi
33417   fi
33418 
33419 
33420   if test "x$path" != "x$new_path"; then
33421     ipath="$new_path"
33422     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33423 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33424   fi
33425 
33426     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33427 
33428   path="$ipath"
33429   has_colon=`$ECHO $path | $GREP ^.:`
33430   new_path="$path"
33431   if test "x$has_colon" = x; then
33432     # Not in mixed or Windows style, start by that.
33433     new_path=`cmd //c echo $path`
33434   fi
33435 
33436 
33437   input_path="$new_path"
33438   # Check if we need to convert this using DOS-style short mode. If the path
33439   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33440   # take no chances and rewrite it.
33441   # Note: m4 eats our [], so we need to use [ and ] instead.
33442   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33443   if test "x$has_forbidden_chars" != x; then
33444     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33445     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33446   fi
33447 
33448 
33449   windows_path="$new_path"
33450   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33451     unix_path=`$CYGPATH -u "$windows_path"`
33452     new_path="$unix_path"
33453   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33454     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33455     new_path="$unix_path"
33456   fi
33457 
33458   if test "x$path" != "x$new_path"; then
33459     ipath="$new_path"
33460     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33461 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33462   fi
33463 
33464   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33465   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33466 
33467     else
33468       # We're on a unix platform. Hooray! :)
33469       path="$ipath"
33470       has_space=`$ECHO "$path" | $GREP " "`
33471       if test "x$has_space" != x; then
33472         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33473 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33474         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33475       fi
33476 
33477       # Use eval to expand a potential ~
33478       eval path="$path"
33479       if test ! -f "$path" && test ! -d "$path"; then
33480         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33481       fi
33482 
33483       if test -d "$path"; then
33484         ipath="`cd "$path"; $THEPWDCMD -L`"
33485       else
33486         dir="`$DIRNAME "$path"`"
33487         base="`$BASENAME "$path"`"
33488         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33489       fi
33490     fi
33491   fi
33492 
33493             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33494           fi
33495           IFS=";"
33496         fi
33497       done
33498       # Convert VS_LIB into SYSROOT_LDFLAGS
33499       for i in $VS_LIB; do
33500         libpath=$i
33501         # Only process non-empty elements
33502         if test "x$libpath" != x; then
33503           IFS="$OLDIFS"
33504           # Check that directory exists before calling fixup_path
33505           testpath=$libpath
33506 
33507   windows_path="$testpath"
33508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33509     unix_path=`$CYGPATH -u "$windows_path"`
33510     testpath="$unix_path"
33511   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33512     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33513     testpath="$unix_path"
33514   fi
33515 
33516           if test -d "$testpath"; then
33517 
33518   # Only process if variable expands to non-empty
33519 
33520   if test "x$libpath" != x; then
33521     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33522 
33523   # Input might be given as Windows format, start by converting to
33524   # unix format.
33525   path="$libpath"
33526   new_path=`$CYGPATH -u "$path"`
33527 
33528   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33529   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33530   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33531   # "foo.exe" is OK but "foo" is an error.
33532   #
33533   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33534   # It is also a way to make sure we got the proper file name for the real test later on.
33535   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33536   if test "x$test_shortpath" = x; then
33537     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33538 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33539     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33540   fi
33541 
33542   # Call helper function which possibly converts this using DOS-style short mode.
33543   # If so, the updated path is stored in $new_path.
33544 
33545   input_path="$new_path"
33546   # Check if we need to convert this using DOS-style short mode. If the path
33547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33548   # take no chances and rewrite it.
33549   # Note: m4 eats our [], so we need to use [ and ] instead.
33550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33551   if test "x$has_forbidden_chars" != x; then
33552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33553     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33554     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33555     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33556       # Going to short mode and back again did indeed matter. Since short mode is
33557       # case insensitive, let's make it lowercase to improve readability.
33558       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33559       # Now convert it back to Unix-style (cygpath)
33560       input_path=`$CYGPATH -u "$shortmode_path"`
33561       new_path="$input_path"
33562     fi
33563   fi
33564 
33565   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33566   if test "x$test_cygdrive_prefix" = x; then
33567     # As a simple fix, exclude /usr/bin since it's not a real path.
33568     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33569       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33570       # a path prefixed by /cygdrive for fixpath to work.
33571       new_path="$CYGWIN_ROOT_PATH$input_path"
33572     fi
33573   fi
33574 
33575 
33576   if test "x$path" != "x$new_path"; then
33577     libpath="$new_path"
33578     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33579 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33580   fi
33581 
33582     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33583 
33584   path="$libpath"
33585   has_colon=`$ECHO $path | $GREP ^.:`
33586   new_path="$path"
33587   if test "x$has_colon" = x; then
33588     # Not in mixed or Windows style, start by that.
33589     new_path=`cmd //c echo $path`
33590   fi
33591 
33592 
33593   input_path="$new_path"
33594   # Check if we need to convert this using DOS-style short mode. If the path
33595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33596   # take no chances and rewrite it.
33597   # Note: m4 eats our [], so we need to use [ and ] instead.
33598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33599   if test "x$has_forbidden_chars" != x; then
33600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33601     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33602   fi
33603 
33604 
33605   windows_path="$new_path"
33606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33607     unix_path=`$CYGPATH -u "$windows_path"`
33608     new_path="$unix_path"
33609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33611     new_path="$unix_path"
33612   fi
33613 
33614   if test "x$path" != "x$new_path"; then
33615     libpath="$new_path"
33616     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33617 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33618   fi
33619 
33620   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33621   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33622 
33623     else
33624       # We're on a unix platform. Hooray! :)
33625       path="$libpath"
33626       has_space=`$ECHO "$path" | $GREP " "`
33627       if test "x$has_space" != x; then
33628         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33629 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33630         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33631       fi
33632 
33633       # Use eval to expand a potential ~
33634       eval path="$path"
33635       if test ! -f "$path" && test ! -d "$path"; then
33636         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33637       fi
33638 
33639       if test -d "$path"; then
33640         libpath="`cd "$path"; $THEPWDCMD -L`"
33641       else
33642         dir="`$DIRNAME "$path"`"
33643         base="`$BASENAME "$path"`"
33644         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33645       fi
33646     fi
33647   fi
33648 
33649             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33650           fi
33651           IFS=";"
33652         fi
33653       done
33654       IFS="$OLDIFS"
33655     fi
33656   else
33657     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33658 $as_echo "not found" >&6; }
33659 
33660     if test "x$VS_ENV_CMD" = x; then
33661       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33662 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33663       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33664 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33665     else
33666       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33667 $as_echo "$as_me: Running the extraction script failed." >&6;}
33668     fi
33669     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33670 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33671     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33672 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33673     as_fn_error $? "Cannot continue" "$LINENO" 5
33674   fi
33675 
33676     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33677     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33678     PATH="$VS_PATH"
33679     # The microsoft toolchain also requires INCLUDE and LIB to be set.
33680     export INCLUDE="$VS_INCLUDE"
33681     export LIB="$VS_LIB"
33682   else
33683     if test "x$XCODE_VERSION_OUTPUT" != x; then
33684       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33685       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33686       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33687     else
33688       # Currently we do not define this for other toolchains. This might change as the need arise.
33689       TOOLCHAIN_VERSION=
33690     fi
33691   fi
33692 
33693 
33694   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33695   # override all other locations.
33696   if test "x$TOOLCHAIN_PATH" != x; then
33697     PATH=$TOOLCHAIN_PATH:$PATH
33698   fi
33699 
33700 
33701   #
33702   # Setup the compilers (CC and CXX)
33703   #
33704 
33705   COMPILER_NAME=C
33706   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33707 
33708   if test "x$CC" != x; then
33709     # User has supplied compiler name already, always let that override.
33710     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33711 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33712     if test "x`basename $CC`" = "x$CC"; then
33713       # A command without a complete path is provided, search $PATH.
33714 
33715       for ac_prog in $CC
33716 do
33717   # Extract the first word of "$ac_prog", so it can be a program name with args.
33718 set dummy $ac_prog; ac_word=$2
33719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33720 $as_echo_n "checking for $ac_word... " >&6; }
33721 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33722   $as_echo_n "(cached) " >&6
33723 else
33724   case $POTENTIAL_CC in
33725   [\\/]* | ?:[\\/]*)
33726   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33727   ;;
33728   *)
33729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33730 for as_dir in $PATH
33731 do
33732   IFS=$as_save_IFS
33733   test -z "$as_dir" && as_dir=.
33734     for ac_exec_ext in '' $ac_executable_extensions; do
33735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33736     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33738     break 2
33739   fi
33740 done
33741   done
33742 IFS=$as_save_IFS
33743 
33744   ;;
33745 esac
33746 fi
33747 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33748 if test -n "$POTENTIAL_CC"; then
33749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33750 $as_echo "$POTENTIAL_CC" >&6; }
33751 else
33752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33753 $as_echo "no" >&6; }
33754 fi
33755 
33756 
33757   test -n "$POTENTIAL_CC" && break
33758 done
33759 
33760       if test "x$POTENTIAL_CC" != x; then
33761         CC=$POTENTIAL_CC
33762       else
33763         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33764       fi
33765     else
33766       # Otherwise it might already be a complete path
33767       if test ! -x "$CC"; then
33768         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33769       fi
33770     fi
33771   else
33772     # No user supplied value. Locate compiler ourselves.
33773 
33774     # If we are cross compiling, assume cross compilation tools follows the
33775     # cross compilation standard where they are prefixed with the autoconf
33776     # standard name for the target. For example the binary
33777     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33778     # If we are not cross compiling, then the default compiler name will be
33779     # used.
33780 
33781     CC=
33782     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33783     # before checking the rest of the PATH.
33784     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33785     # step, this should not be necessary.
33786     if test -n "$TOOLCHAIN_PATH"; then
33787       PATH_save="$PATH"
33788       PATH="$TOOLCHAIN_PATH"
33789       if test -n "$ac_tool_prefix"; then
33790   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33791 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33793 $as_echo_n "checking for $ac_word... " >&6; }
33794 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33795   $as_echo_n "(cached) " >&6
33796 else
33797   case $TOOLCHAIN_PATH_CC in
33798   [\\/]* | ?:[\\/]*)
33799   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33800   ;;
33801   *)
33802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33803 for as_dir in $PATH
33804 do
33805   IFS=$as_save_IFS
33806   test -z "$as_dir" && as_dir=.
33807     for ac_exec_ext in '' $ac_executable_extensions; do
33808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33809     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33811     break 2
33812   fi
33813 done
33814   done
33815 IFS=$as_save_IFS
33816 
33817   ;;
33818 esac
33819 fi
33820 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33821 if test -n "$TOOLCHAIN_PATH_CC"; then
33822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33823 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33824 else
33825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33826 $as_echo "no" >&6; }
33827 fi
33828 
33829 
33830 fi
33831 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33832   ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33833   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33834 set dummy $SEARCH_LIST; ac_word=$2
33835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33836 $as_echo_n "checking for $ac_word... " >&6; }
33837 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33838   $as_echo_n "(cached) " >&6
33839 else
33840   case $ac_pt_TOOLCHAIN_PATH_CC in
33841   [\\/]* | ?:[\\/]*)
33842   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33843   ;;
33844   *)
33845   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33846 for as_dir in $PATH
33847 do
33848   IFS=$as_save_IFS
33849   test -z "$as_dir" && as_dir=.
33850     for ac_exec_ext in '' $ac_executable_extensions; do
33851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33852     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33854     break 2
33855   fi
33856 done
33857   done
33858 IFS=$as_save_IFS
33859 
33860   ;;
33861 esac
33862 fi
33863 ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33864 if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33866 $as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33867 else
33868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33869 $as_echo "no" >&6; }
33870 fi
33871 
33872   if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33873     TOOLCHAIN_PATH_CC=""
33874   else
33875     case $cross_compiling:$ac_tool_warned in
33876 yes:)
33877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33878 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33879 ac_tool_warned=yes ;;
33880 esac
33881     TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33882   fi
33883 else
33884   TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33885 fi
33886 
33887       CC=$TOOLCHAIN_PATH_CC
33888       PATH="$PATH_save"
33889     fi
33890 
33891     # AC_PATH_TOOL can't be run multiple times with the same variable,
33892     # so create a new name for this run.
33893     if test "x$CC" = x; then
33894       if test -n "$ac_tool_prefix"; then
33895   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33896 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33898 $as_echo_n "checking for $ac_word... " >&6; }
33899 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33900   $as_echo_n "(cached) " >&6
33901 else
33902   case $POTENTIAL_CC in
33903   [\\/]* | ?:[\\/]*)
33904   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33905   ;;
33906   *)
33907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33908 for as_dir in $PATH
33909 do
33910   IFS=$as_save_IFS
33911   test -z "$as_dir" && as_dir=.
33912     for ac_exec_ext in '' $ac_executable_extensions; do
33913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33914     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33916     break 2
33917   fi
33918 done
33919   done
33920 IFS=$as_save_IFS
33921 
33922   ;;
33923 esac
33924 fi
33925 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33926 if test -n "$POTENTIAL_CC"; then
33927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33928 $as_echo "$POTENTIAL_CC" >&6; }
33929 else
33930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33931 $as_echo "no" >&6; }
33932 fi
33933 
33934 
33935 fi
33936 if test -z "$ac_cv_path_POTENTIAL_CC"; then
33937   ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33938   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33939 set dummy $SEARCH_LIST; ac_word=$2
33940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33941 $as_echo_n "checking for $ac_word... " >&6; }
33942 if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33943   $as_echo_n "(cached) " >&6
33944 else
33945   case $ac_pt_POTENTIAL_CC in
33946   [\\/]* | ?:[\\/]*)
33947   ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33948   ;;
33949   *)
33950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33951 for as_dir in $PATH
33952 do
33953   IFS=$as_save_IFS
33954   test -z "$as_dir" && as_dir=.
33955     for ac_exec_ext in '' $ac_executable_extensions; do
33956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33957     ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33959     break 2
33960   fi
33961 done
33962   done
33963 IFS=$as_save_IFS
33964 
33965   ;;
33966 esac
33967 fi
33968 ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33969 if test -n "$ac_pt_POTENTIAL_CC"; then
33970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33971 $as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33972 else
33973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33974 $as_echo "no" >&6; }
33975 fi
33976 
33977   if test "x$ac_pt_POTENTIAL_CC" = x; then
33978     POTENTIAL_CC=""
33979   else
33980     case $cross_compiling:$ac_tool_warned in
33981 yes:)
33982 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33983 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33984 ac_tool_warned=yes ;;
33985 esac
33986     POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33987   fi
33988 else
33989   POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33990 fi
33991 
33992       CC=$POTENTIAL_CC
33993     fi
33994 
33995     if test "x$CC" = x; then
33996 
33997   # Print a helpful message on how to acquire the necessary build dependency.
33998   # devkit is the help tag: freetype, cups, alsa etc
33999   MISSING_DEPENDENCY=devkit
34000 
34001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34002     cygwin_help $MISSING_DEPENDENCY
34003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34004     msys_help $MISSING_DEPENDENCY
34005   else
34006     PKGHANDLER_COMMAND=
34007 
34008     case $PKGHANDLER in
34009       apt-get)
34010         apt_help     $MISSING_DEPENDENCY ;;
34011       yum)
34012         yum_help     $MISSING_DEPENDENCY ;;
34013       brew)
34014         brew_help    $MISSING_DEPENDENCY ;;
34015       port)
34016         port_help    $MISSING_DEPENDENCY ;;
34017       pkgutil)
34018         pkgutil_help $MISSING_DEPENDENCY ;;
34019       pkgadd)
34020         pkgadd_help  $MISSING_DEPENDENCY ;;
34021     esac
34022 
34023     if test "x$PKGHANDLER_COMMAND" != x; then
34024       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34025     fi
34026   fi
34027 
34028       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34029     fi
34030   fi
34031 
34032   # Now we have a compiler binary in CC. Make sure it's okay.
34033 
34034   # Only process if variable expands to non-empty
34035 
34036   if test "x$CC" != x; then
34037     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34038 
34039   # First separate the path from the arguments. This will split at the first
34040   # space.
34041   complete="$CC"
34042   path="${complete%% *}"
34043   tmp="$complete EOL"
34044   arguments="${tmp#* }"
34045 
34046   # Input might be given as Windows format, start by converting to
34047   # unix format.
34048   new_path=`$CYGPATH -u "$path"`
34049 
34050   # Now try to locate executable using which
34051   new_path=`$WHICH "$new_path" 2> /dev/null`
34052   # bat and cmd files are not always considered executable in cygwin causing which
34053   # to not find them
34054   if test "x$new_path" = x \
34055       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34056       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34057     new_path=`$CYGPATH -u "$path"`
34058   fi
34059   if test "x$new_path" = x; then
34060     # Oops. Which didn't find the executable.
34061     # The splitting of arguments from the executable at a space might have been incorrect,
34062     # since paths with space are more likely in Windows. Give it another try with the whole
34063     # argument.
34064     path="$complete"
34065     arguments="EOL"
34066     new_path=`$CYGPATH -u "$path"`
34067     new_path=`$WHICH "$new_path" 2> /dev/null`
34068     # bat and cmd files are not always considered executable in cygwin causing which
34069     # to not find them
34070     if test "x$new_path" = x \
34071         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34072         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34073       new_path=`$CYGPATH -u "$path"`
34074     fi
34075     if test "x$new_path" = x; then
34076       # It's still not found. Now this is an unrecoverable error.
34077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34078 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34079       has_space=`$ECHO "$complete" | $GREP " "`
34080       if test "x$has_space" != x; then
34081         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34082 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34083       fi
34084       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34085     fi
34086   fi
34087 
34088   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34089   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34090   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34091   # "foo.exe" is OK but "foo" is an error.
34092   #
34093   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34094   # It is also a way to make sure we got the proper file name for the real test later on.
34095   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34096   if test "x$test_shortpath" = x; then
34097     # Short path failed, file does not exist as specified.
34098     # Try adding .exe or .cmd
34099     if test -f "${new_path}.exe"; then
34100       input_to_shortpath="${new_path}.exe"
34101     elif test -f "${new_path}.cmd"; then
34102       input_to_shortpath="${new_path}.cmd"
34103     else
34104       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34105 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34106       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34107 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34108       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34109     fi
34110   else
34111     input_to_shortpath="$new_path"
34112   fi
34113 
34114   # Call helper function which possibly converts this using DOS-style short mode.
34115   # If so, the updated path is stored in $new_path.
34116   new_path="$input_to_shortpath"
34117 
34118   input_path="$input_to_shortpath"
34119   # Check if we need to convert this using DOS-style short mode. If the path
34120   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34121   # take no chances and rewrite it.
34122   # Note: m4 eats our [], so we need to use [ and ] instead.
34123   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34124   if test "x$has_forbidden_chars" != x; then
34125     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34126     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34127     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34128     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34129       # Going to short mode and back again did indeed matter. Since short mode is
34130       # case insensitive, let's make it lowercase to improve readability.
34131       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34132       # Now convert it back to Unix-style (cygpath)
34133       input_path=`$CYGPATH -u "$shortmode_path"`
34134       new_path="$input_path"
34135     fi
34136   fi
34137 
34138   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34139   if test "x$test_cygdrive_prefix" = x; then
34140     # As a simple fix, exclude /usr/bin since it's not a real path.
34141     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34142       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34143       # a path prefixed by /cygdrive for fixpath to work.
34144       new_path="$CYGWIN_ROOT_PATH$input_path"
34145     fi
34146   fi
34147 
34148   # remove trailing .exe if any
34149   new_path="${new_path/%.exe/}"
34150 
34151     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34152 
34153   # First separate the path from the arguments. This will split at the first
34154   # space.
34155   complete="$CC"
34156   path="${complete%% *}"
34157   tmp="$complete EOL"
34158   arguments="${tmp#* }"
34159 
34160   # Input might be given as Windows format, start by converting to
34161   # unix format.
34162   new_path="$path"
34163 
34164   windows_path="$new_path"
34165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34166     unix_path=`$CYGPATH -u "$windows_path"`
34167     new_path="$unix_path"
34168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34170     new_path="$unix_path"
34171   fi
34172 
34173 
34174   # Now try to locate executable using which
34175   new_path=`$WHICH "$new_path" 2> /dev/null`
34176 
34177   if test "x$new_path" = x; then
34178     # Oops. Which didn't find the executable.
34179     # The splitting of arguments from the executable at a space might have been incorrect,
34180     # since paths with space are more likely in Windows. Give it another try with the whole
34181     # argument.
34182     path="$complete"
34183     arguments="EOL"
34184     new_path="$path"
34185 
34186   windows_path="$new_path"
34187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34188     unix_path=`$CYGPATH -u "$windows_path"`
34189     new_path="$unix_path"
34190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34191     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34192     new_path="$unix_path"
34193   fi
34194 
34195 
34196     new_path=`$WHICH "$new_path" 2> /dev/null`
34197     # bat and cmd files are not always considered executable in MSYS causing which
34198     # to not find them
34199     if test "x$new_path" = x \
34200         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34201         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34202       new_path="$path"
34203 
34204   windows_path="$new_path"
34205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34206     unix_path=`$CYGPATH -u "$windows_path"`
34207     new_path="$unix_path"
34208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34210     new_path="$unix_path"
34211   fi
34212 
34213     fi
34214 
34215     if test "x$new_path" = x; then
34216       # It's still not found. Now this is an unrecoverable error.
34217       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34218 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34219       has_space=`$ECHO "$complete" | $GREP " "`
34220       if test "x$has_space" != x; then
34221         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34222 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34223       fi
34224       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34225     fi
34226   fi
34227 
34228   # Now new_path has a complete unix path to the binary
34229   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34230     # Keep paths in /bin as-is, but remove trailing .exe if any
34231     new_path="${new_path/%.exe/}"
34232     # Do not save /bin paths to all_fixpath_prefixes!
34233   else
34234     # Not in mixed or Windows style, start by that.
34235     new_path=`cmd //c echo $new_path`
34236 
34237   input_path="$new_path"
34238   # Check if we need to convert this using DOS-style short mode. If the path
34239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34240   # take no chances and rewrite it.
34241   # Note: m4 eats our [], so we need to use [ and ] instead.
34242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34243   if test "x$has_forbidden_chars" != x; then
34244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34245     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34246   fi
34247 
34248     # Output is in $new_path
34249 
34250   windows_path="$new_path"
34251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34252     unix_path=`$CYGPATH -u "$windows_path"`
34253     new_path="$unix_path"
34254   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34255     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34256     new_path="$unix_path"
34257   fi
34258 
34259     # remove trailing .exe if any
34260     new_path="${new_path/%.exe/}"
34261 
34262     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34263     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34264   fi
34265 
34266     else
34267       # We're on a unix platform. Hooray! :)
34268       # First separate the path from the arguments. This will split at the first
34269       # space.
34270       complete="$CC"
34271       path="${complete%% *}"
34272       tmp="$complete EOL"
34273       arguments="${tmp#* }"
34274 
34275       # Cannot rely on the command "which" here since it doesn't always work.
34276       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34277       if test -z "$is_absolute_path"; then
34278         # Path to executable is not absolute. Find it.
34279         IFS_save="$IFS"
34280         IFS=:
34281         for p in $PATH; do
34282           if test -f "$p/$path" && test -x "$p/$path"; then
34283             new_path="$p/$path"
34284             break
34285           fi
34286         done
34287         IFS="$IFS_save"
34288       else
34289         # This is an absolute path, we can use it without further modifications.
34290         new_path="$path"
34291       fi
34292 
34293       if test "x$new_path" = x; then
34294         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34295 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34296         has_space=`$ECHO "$complete" | $GREP " "`
34297         if test "x$has_space" != x; then
34298           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34299 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34300         fi
34301         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34302       fi
34303     fi
34304 
34305     # Now join together the path and the arguments once again
34306     if test "x$arguments" != xEOL; then
34307       new_complete="$new_path ${arguments% *}"
34308     else
34309       new_complete="$new_path"
34310     fi
34311 
34312     if test "x$complete" != "x$new_complete"; then
34313       CC="$new_complete"
34314       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34315 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34316     fi
34317   fi
34318 
34319   TEST_COMPILER="$CC"
34320 
34321   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34322 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
34323   SYMLINK_ORIGINAL="$TEST_COMPILER"
34324 
34325   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34326     # Follow a chain of symbolic links. Use readlink
34327     # where it exists, else fall back to horribly
34328     # complicated shell code.
34329     if test "x$READLINK_TESTED" != yes; then
34330       # On MacOSX there is a readlink tool with a different
34331       # purpose than the GNU readlink tool. Check the found readlink.
34332       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34333       if test "x$ISGNU" = x; then
34334         # A readlink that we do not know how to use.
34335         # Are there other non-GNU readlinks out there?
34336         READLINK_TESTED=yes
34337         READLINK=
34338       fi
34339     fi
34340 
34341     if test "x$READLINK" != x; then
34342       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34343     else
34344       # Save the current directory for restoring afterwards
34345       STARTDIR=$PWD
34346       COUNTER=0
34347       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34348       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34349       cd $sym_link_dir
34350       # Use -P flag to resolve symlinks in directories.
34351       cd `$THEPWDCMD -P`
34352       sym_link_dir=`$THEPWDCMD -P`
34353       # Resolve file symlinks
34354       while test $COUNTER -lt 20; do
34355         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34356         if test "x$ISLINK" == x; then
34357           # This is not a symbolic link! We are done!
34358           break
34359         fi
34360         # Again resolve directory symlinks since the target of the just found
34361         # link could be in a different directory
34362         cd `$DIRNAME $ISLINK`
34363         sym_link_dir=`$THEPWDCMD -P`
34364         sym_link_file=`$BASENAME $ISLINK`
34365         let COUNTER=COUNTER+1
34366       done
34367       cd $STARTDIR
34368       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34369     fi
34370   fi
34371 
34372   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34373     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34374 $as_echo "no symlink" >&6; }
34375   else
34376     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34377 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34378 
34379     # We can't handle ccache by gcc wrappers, since we need to know if we're
34380     # using ccache. Instead ccache usage must be controlled by a configure option.
34381     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34382     if test "x$COMPILER_BASENAME" = "xccache"; then
34383       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34384 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34385       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34386     fi
34387   fi
34388 
34389 
34390   COMPILER=$CC
34391   COMPILER_NAME=$COMPILER_NAME
34392 
34393   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34394     # cc -V output typically looks like
34395     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34396     # or
34397     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34398     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34399     # Check that this is likely to be the Solaris Studio cc.
34400     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34401     if test $? -ne 0; then
34402       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34403       { $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
34404 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34405       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34406 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34407       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34408 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34409       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34410     fi
34411     # Remove usage instructions (if present), and
34412     # collapse compiler output into a single line
34413     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34414         $SED -e 's/ *[Uu]sage:.*//'`
34415     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34416         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34417   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34418     # xlc -qversion output typically looks like
34419     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34420     #     Version: 11.01.0000.0015
34421     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34422     # Check that this is likely to be the IBM XL C compiler.
34423     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34424     if test $? -ne 0; then
34425       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34426       { $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
34427 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34428       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34429 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34430       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34431 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34432       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34433     fi
34434     # Collapse compiler output into a single line
34435     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34436     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34437         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34438   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34439     # There is no specific version flag, but all output starts with a version string.
34440     # First line typically looks something like:
34441     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34442     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34443     # Check that this is likely to be Microsoft CL.EXE.
34444     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34445     if test $? -ne 0; then
34446       { $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
34447 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34448       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34449 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34450       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34451     fi
34452     # Collapse compiler output into a single line
34453     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34454     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34455         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34456   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34457     # gcc --version output typically looks like
34458     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34459     #     Copyright (C) 2013 Free Software Foundation, Inc.
34460     #     This is free software; see the source for copying conditions.  There is NO
34461     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34462     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34463     # Check that this is likely to be GCC.
34464     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34465     if test $? -ne 0; then
34466       { $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
34467 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34468       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34469 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34470       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34471     fi
34472     # Remove Copyright and legalese from version string, and
34473     # collapse into a single line
34474     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34475         $SED -e 's/ *Copyright .*//'`
34476     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34477         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34478   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34479     # clang --version output typically looks like
34480     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34481     #    clang version 3.3 (tags/RELEASE_33/final)
34482     # or
34483     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34484     #    Target: x86_64-pc-linux-gnu
34485     #    Thread model: posix
34486     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34487     # Check that this is likely to be clang
34488     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34489     if test $? -ne 0; then
34490       { $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
34491 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34492       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34493 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34494       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34495     fi
34496     # Collapse compiler output into a single line
34497     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34498     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34499         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34500   else
34501       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34502   fi
34503   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34504   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34505   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34506   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34507 
34508   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34509 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34510 
34511 
34512   # Now that we have resolved CC ourself, let autoconf have its go at it
34513   ac_ext=c
34514 ac_cpp='$CPP $CPPFLAGS'
34515 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34516 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34517 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34518 if test -n "$ac_tool_prefix"; then
34519   for ac_prog in $CC
34520   do
34521     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34522 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34524 $as_echo_n "checking for $ac_word... " >&6; }
34525 if ${ac_cv_prog_CC+:} false; then :
34526   $as_echo_n "(cached) " >&6
34527 else
34528   if test -n "$CC"; then
34529   ac_cv_prog_CC="$CC" # Let the user override the test.
34530 else
34531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34532 for as_dir in $PATH
34533 do
34534   IFS=$as_save_IFS
34535   test -z "$as_dir" && as_dir=.
34536     for ac_exec_ext in '' $ac_executable_extensions; do
34537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34538     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34540     break 2
34541   fi
34542 done
34543   done
34544 IFS=$as_save_IFS
34545 
34546 fi
34547 fi
34548 CC=$ac_cv_prog_CC
34549 if test -n "$CC"; then
34550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34551 $as_echo "$CC" >&6; }
34552 else
34553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34554 $as_echo "no" >&6; }
34555 fi
34556 
34557 
34558     test -n "$CC" && break
34559   done
34560 fi
34561 if test -z "$CC"; then
34562   ac_ct_CC=$CC
34563   for ac_prog in $CC
34564 do
34565   # Extract the first word of "$ac_prog", so it can be a program name with args.
34566 set dummy $ac_prog; ac_word=$2
34567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34568 $as_echo_n "checking for $ac_word... " >&6; }
34569 if ${ac_cv_prog_ac_ct_CC+:} false; then :
34570   $as_echo_n "(cached) " >&6
34571 else
34572   if test -n "$ac_ct_CC"; then
34573   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34574 else
34575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34576 for as_dir in $PATH
34577 do
34578   IFS=$as_save_IFS
34579   test -z "$as_dir" && as_dir=.
34580     for ac_exec_ext in '' $ac_executable_extensions; do
34581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34582     ac_cv_prog_ac_ct_CC="$ac_prog"
34583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34584     break 2
34585   fi
34586 done
34587   done
34588 IFS=$as_save_IFS
34589 
34590 fi
34591 fi
34592 ac_ct_CC=$ac_cv_prog_ac_ct_CC
34593 if test -n "$ac_ct_CC"; then
34594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34595 $as_echo "$ac_ct_CC" >&6; }
34596 else
34597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34598 $as_echo "no" >&6; }
34599 fi
34600 
34601 
34602   test -n "$ac_ct_CC" && break
34603 done
34604 
34605   if test "x$ac_ct_CC" = x; then
34606     CC=""
34607   else
34608     case $cross_compiling:$ac_tool_warned in
34609 yes:)
34610 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34611 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34612 ac_tool_warned=yes ;;
34613 esac
34614     CC=$ac_ct_CC
34615   fi
34616 fi
34617 
34618 
34619 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34620 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34621 as_fn_error $? "no acceptable C compiler found in \$PATH
34622 See \`config.log' for more details" "$LINENO" 5; }
34623 
34624 # Provide some information about the compiler.
34625 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34626 set X $ac_compile
34627 ac_compiler=$2
34628 for ac_option in --version -v -V -qversion; do
34629   { { ac_try="$ac_compiler $ac_option >&5"
34630 case "(($ac_try" in
34631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34632   *) ac_try_echo=$ac_try;;
34633 esac
34634 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34635 $as_echo "$ac_try_echo"; } >&5
34636   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34637   ac_status=$?
34638   if test -s conftest.err; then
34639     sed '10a\
34640 ... rest of stderr output deleted ...
34641          10q' conftest.err >conftest.er1
34642     cat conftest.er1 >&5
34643   fi
34644   rm -f conftest.er1 conftest.err
34645   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34646   test $ac_status = 0; }
34647 done
34648 
34649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34650 /* end confdefs.h.  */
34651 
34652 int
34653 main ()
34654 {
34655 
34656   ;
34657   return 0;
34658 }
34659 _ACEOF
34660 ac_clean_files_save=$ac_clean_files
34661 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34662 # Try to create an executable without -o first, disregard a.out.
34663 # It will help us diagnose broken compilers, and finding out an intuition
34664 # of exeext.
34665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34666 $as_echo_n "checking whether the C compiler works... " >&6; }
34667 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34668 
34669 # The possible output files:
34670 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34671 
34672 ac_rmfiles=
34673 for ac_file in $ac_files
34674 do
34675   case $ac_file in
34676     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34677     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34678   esac
34679 done
34680 rm -f $ac_rmfiles
34681 
34682 if { { ac_try="$ac_link_default"
34683 case "(($ac_try" in
34684   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34685   *) ac_try_echo=$ac_try;;
34686 esac
34687 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34688 $as_echo "$ac_try_echo"; } >&5
34689   (eval "$ac_link_default") 2>&5
34690   ac_status=$?
34691   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34692   test $ac_status = 0; }; then :
34693   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34694 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34695 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
34696 # so that the user can short-circuit this test for compilers unknown to
34697 # Autoconf.
34698 for ac_file in $ac_files ''
34699 do
34700   test -f "$ac_file" || continue
34701   case $ac_file in
34702     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34703         ;;
34704     [ab].out )
34705         # We found the default executable, but exeext='' is most
34706         # certainly right.
34707         break;;
34708     *.* )
34709         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34710         then :; else
34711            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34712         fi
34713         # We set ac_cv_exeext here because the later test for it is not
34714         # safe: cross compilers may not add the suffix if given an `-o'
34715         # argument, so we may need to know it at that point already.
34716         # Even if this section looks crufty: it has the advantage of
34717         # actually working.
34718         break;;
34719     * )
34720         break;;
34721   esac
34722 done
34723 test "$ac_cv_exeext" = no && ac_cv_exeext=
34724 
34725 else
34726   ac_file=''
34727 fi
34728 if test -z "$ac_file"; then :
34729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34730 $as_echo "no" >&6; }
34731 $as_echo "$as_me: failed program was:" >&5
34732 sed 's/^/| /' conftest.$ac_ext >&5
34733 
34734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34735 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34736 as_fn_error 77 "C compiler cannot create executables
34737 See \`config.log' for more details" "$LINENO" 5; }
34738 else
34739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34740 $as_echo "yes" >&6; }
34741 fi
34742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34743 $as_echo_n "checking for C compiler default output file name... " >&6; }
34744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34745 $as_echo "$ac_file" >&6; }
34746 ac_exeext=$ac_cv_exeext
34747 
34748 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34749 ac_clean_files=$ac_clean_files_save
34750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34751 $as_echo_n "checking for suffix of executables... " >&6; }
34752 if { { ac_try="$ac_link"
34753 case "(($ac_try" in
34754   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34755   *) ac_try_echo=$ac_try;;
34756 esac
34757 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34758 $as_echo "$ac_try_echo"; } >&5
34759   (eval "$ac_link") 2>&5
34760   ac_status=$?
34761   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34762   test $ac_status = 0; }; then :
34763   # If both `conftest.exe' and `conftest' are `present' (well, observable)
34764 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34765 # work properly (i.e., refer to `conftest.exe'), while it won't with
34766 # `rm'.
34767 for ac_file in conftest.exe conftest conftest.*; do
34768   test -f "$ac_file" || continue
34769   case $ac_file in
34770     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34771     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34772           break;;
34773     * ) break;;
34774   esac
34775 done
34776 else
34777   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34778 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34779 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34780 See \`config.log' for more details" "$LINENO" 5; }
34781 fi
34782 rm -f conftest conftest$ac_cv_exeext
34783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34784 $as_echo "$ac_cv_exeext" >&6; }
34785 
34786 rm -f conftest.$ac_ext
34787 EXEEXT=$ac_cv_exeext
34788 ac_exeext=$EXEEXT
34789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34790 /* end confdefs.h.  */
34791 #include <stdio.h>
34792 int
34793 main ()
34794 {
34795 FILE *f = fopen ("conftest.out", "w");
34796  return ferror (f) || fclose (f) != 0;
34797 
34798   ;
34799   return 0;
34800 }
34801 _ACEOF
34802 ac_clean_files="$ac_clean_files conftest.out"
34803 # Check that the compiler produces executables we can run.  If not, either
34804 # the compiler is broken, or we cross compile.
34805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34806 $as_echo_n "checking whether we are cross compiling... " >&6; }
34807 if test "$cross_compiling" != yes; then
34808   { { ac_try="$ac_link"
34809 case "(($ac_try" in
34810   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34811   *) ac_try_echo=$ac_try;;
34812 esac
34813 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34814 $as_echo "$ac_try_echo"; } >&5
34815   (eval "$ac_link") 2>&5
34816   ac_status=$?
34817   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34818   test $ac_status = 0; }
34819   if { ac_try='./conftest$ac_cv_exeext'
34820   { { case "(($ac_try" in
34821   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34822   *) ac_try_echo=$ac_try;;
34823 esac
34824 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34825 $as_echo "$ac_try_echo"; } >&5
34826   (eval "$ac_try") 2>&5
34827   ac_status=$?
34828   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34829   test $ac_status = 0; }; }; then
34830     cross_compiling=no
34831   else
34832     if test "$cross_compiling" = maybe; then
34833         cross_compiling=yes
34834     else
34835         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34836 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34837 as_fn_error $? "cannot run C compiled programs.
34838 If you meant to cross compile, use \`--host'.
34839 See \`config.log' for more details" "$LINENO" 5; }
34840     fi
34841   fi
34842 fi
34843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34844 $as_echo "$cross_compiling" >&6; }
34845 
34846 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34847 ac_clean_files=$ac_clean_files_save
34848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34849 $as_echo_n "checking for suffix of object files... " >&6; }
34850 if ${ac_cv_objext+:} false; then :
34851   $as_echo_n "(cached) " >&6
34852 else
34853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34854 /* end confdefs.h.  */
34855 
34856 int
34857 main ()
34858 {
34859 
34860   ;
34861   return 0;
34862 }
34863 _ACEOF
34864 rm -f conftest.o conftest.obj
34865 if { { ac_try="$ac_compile"
34866 case "(($ac_try" in
34867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34868   *) ac_try_echo=$ac_try;;
34869 esac
34870 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34871 $as_echo "$ac_try_echo"; } >&5
34872   (eval "$ac_compile") 2>&5
34873   ac_status=$?
34874   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34875   test $ac_status = 0; }; then :
34876   for ac_file in conftest.o conftest.obj conftest.*; do
34877   test -f "$ac_file" || continue;
34878   case $ac_file in
34879     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34880     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34881        break;;
34882   esac
34883 done
34884 else
34885   $as_echo "$as_me: failed program was:" >&5
34886 sed 's/^/| /' conftest.$ac_ext >&5
34887 
34888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34889 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34890 as_fn_error $? "cannot compute suffix of object files: cannot compile
34891 See \`config.log' for more details" "$LINENO" 5; }
34892 fi
34893 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34894 fi
34895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34896 $as_echo "$ac_cv_objext" >&6; }
34897 OBJEXT=$ac_cv_objext
34898 ac_objext=$OBJEXT
34899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34900 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34901 if ${ac_cv_c_compiler_gnu+:} false; then :
34902   $as_echo_n "(cached) " >&6
34903 else
34904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34905 /* end confdefs.h.  */
34906 
34907 int
34908 main ()
34909 {
34910 #ifndef __GNUC__
34911        choke me
34912 #endif
34913 
34914   ;
34915   return 0;
34916 }
34917 _ACEOF
34918 if ac_fn_c_try_compile "$LINENO"; then :
34919   ac_compiler_gnu=yes
34920 else
34921   ac_compiler_gnu=no
34922 fi
34923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34924 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34925 
34926 fi
34927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34928 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34929 if test $ac_compiler_gnu = yes; then
34930   GCC=yes
34931 else
34932   GCC=
34933 fi
34934 ac_test_CFLAGS=${CFLAGS+set}
34935 ac_save_CFLAGS=$CFLAGS
34936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34937 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34938 if ${ac_cv_prog_cc_g+:} false; then :
34939   $as_echo_n "(cached) " >&6
34940 else
34941   ac_save_c_werror_flag=$ac_c_werror_flag
34942    ac_c_werror_flag=yes
34943    ac_cv_prog_cc_g=no
34944    CFLAGS="-g"
34945    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34946 /* end confdefs.h.  */
34947 
34948 int
34949 main ()
34950 {
34951 
34952   ;
34953   return 0;
34954 }
34955 _ACEOF
34956 if ac_fn_c_try_compile "$LINENO"; then :
34957   ac_cv_prog_cc_g=yes
34958 else
34959   CFLAGS=""
34960       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34961 /* end confdefs.h.  */
34962 
34963 int
34964 main ()
34965 {
34966 
34967   ;
34968   return 0;
34969 }
34970 _ACEOF
34971 if ac_fn_c_try_compile "$LINENO"; then :
34972 
34973 else
34974   ac_c_werror_flag=$ac_save_c_werror_flag
34975          CFLAGS="-g"
34976          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34977 /* end confdefs.h.  */
34978 
34979 int
34980 main ()
34981 {
34982 
34983   ;
34984   return 0;
34985 }
34986 _ACEOF
34987 if ac_fn_c_try_compile "$LINENO"; then :
34988   ac_cv_prog_cc_g=yes
34989 fi
34990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34991 fi
34992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34993 fi
34994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34995    ac_c_werror_flag=$ac_save_c_werror_flag
34996 fi
34997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34998 $as_echo "$ac_cv_prog_cc_g" >&6; }
34999 if test "$ac_test_CFLAGS" = set; then
35000   CFLAGS=$ac_save_CFLAGS
35001 elif test $ac_cv_prog_cc_g = yes; then
35002   if test "$GCC" = yes; then
35003     CFLAGS="-g -O2"
35004   else
35005     CFLAGS="-g"
35006   fi
35007 else
35008   if test "$GCC" = yes; then
35009     CFLAGS="-O2"
35010   else
35011     CFLAGS=
35012   fi
35013 fi
35014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35015 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35016 if ${ac_cv_prog_cc_c89+:} false; then :
35017   $as_echo_n "(cached) " >&6
35018 else
35019   ac_cv_prog_cc_c89=no
35020 ac_save_CC=$CC
35021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35022 /* end confdefs.h.  */
35023 #include <stdarg.h>
35024 #include <stdio.h>
35025 struct stat;
35026 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35027 struct buf { int x; };
35028 FILE * (*rcsopen) (struct buf *, struct stat *, int);
35029 static char *e (p, i)
35030      char **p;
35031      int i;
35032 {
35033   return p[i];
35034 }
35035 static char *f (char * (*g) (char **, int), char **p, ...)
35036 {
35037   char *s;
35038   va_list v;
35039   va_start (v,p);
35040   s = g (p, va_arg (v,int));
35041   va_end (v);
35042   return s;
35043 }
35044 
35045 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35046    function prototypes and stuff, but not '\xHH' hex character constants.
35047    These don't provoke an error unfortunately, instead are silently treated
35048    as 'x'.  The following induces an error, until -std is added to get
35049    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35050    array size at least.  It's necessary to write '\x00'==0 to get something
35051    that's true only with -std.  */
35052 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35053 
35054 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35055    inside strings and character constants.  */
35056 #define FOO(x) 'x'
35057 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35058 
35059 int test (int i, double x);
35060 struct s1 {int (*f) (int a);};
35061 struct s2 {int (*f) (double a);};
35062 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35063 int argc;
35064 char **argv;
35065 int
35066 main ()
35067 {
35068 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35069   ;
35070   return 0;
35071 }
35072 _ACEOF
35073 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35074         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35075 do
35076   CC="$ac_save_CC $ac_arg"
35077   if ac_fn_c_try_compile "$LINENO"; then :
35078   ac_cv_prog_cc_c89=$ac_arg
35079 fi
35080 rm -f core conftest.err conftest.$ac_objext
35081   test "x$ac_cv_prog_cc_c89" != "xno" && break
35082 done
35083 rm -f conftest.$ac_ext
35084 CC=$ac_save_CC
35085 
35086 fi
35087 # AC_CACHE_VAL
35088 case "x$ac_cv_prog_cc_c89" in
35089   x)
35090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35091 $as_echo "none needed" >&6; } ;;
35092   xno)
35093     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35094 $as_echo "unsupported" >&6; } ;;
35095   *)
35096     CC="$CC $ac_cv_prog_cc_c89"
35097     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35098 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35099 esac
35100 if test "x$ac_cv_prog_cc_c89" != xno; then :
35101 
35102 fi
35103 
35104 ac_ext=cpp
35105 ac_cpp='$CXXCPP $CPPFLAGS'
35106 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35107 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35108 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35109 
35110 
35111 
35112   COMPILER_NAME=C++
35113   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35114 
35115   if test "x$CXX" != x; then
35116     # User has supplied compiler name already, always let that override.
35117     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35118 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35119     if test "x`basename $CXX`" = "x$CXX"; then
35120       # A command without a complete path is provided, search $PATH.
35121 
35122       for ac_prog in $CXX
35123 do
35124   # Extract the first word of "$ac_prog", so it can be a program name with args.
35125 set dummy $ac_prog; ac_word=$2
35126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35127 $as_echo_n "checking for $ac_word... " >&6; }
35128 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35129   $as_echo_n "(cached) " >&6
35130 else
35131   case $POTENTIAL_CXX in
35132   [\\/]* | ?:[\\/]*)
35133   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35134   ;;
35135   *)
35136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35137 for as_dir in $PATH
35138 do
35139   IFS=$as_save_IFS
35140   test -z "$as_dir" && as_dir=.
35141     for ac_exec_ext in '' $ac_executable_extensions; do
35142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35143     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35145     break 2
35146   fi
35147 done
35148   done
35149 IFS=$as_save_IFS
35150 
35151   ;;
35152 esac
35153 fi
35154 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35155 if test -n "$POTENTIAL_CXX"; then
35156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35157 $as_echo "$POTENTIAL_CXX" >&6; }
35158 else
35159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35160 $as_echo "no" >&6; }
35161 fi
35162 
35163 
35164   test -n "$POTENTIAL_CXX" && break
35165 done
35166 
35167       if test "x$POTENTIAL_CXX" != x; then
35168         CXX=$POTENTIAL_CXX
35169       else
35170         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35171       fi
35172     else
35173       # Otherwise it might already be a complete path
35174       if test ! -x "$CXX"; then
35175         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35176       fi
35177     fi
35178   else
35179     # No user supplied value. Locate compiler ourselves.
35180 
35181     # If we are cross compiling, assume cross compilation tools follows the
35182     # cross compilation standard where they are prefixed with the autoconf
35183     # standard name for the target. For example the binary
35184     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35185     # If we are not cross compiling, then the default compiler name will be
35186     # used.
35187 
35188     CXX=
35189     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35190     # before checking the rest of the PATH.
35191     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35192     # step, this should not be necessary.
35193     if test -n "$TOOLCHAIN_PATH"; then
35194       PATH_save="$PATH"
35195       PATH="$TOOLCHAIN_PATH"
35196       if test -n "$ac_tool_prefix"; then
35197   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35198 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35200 $as_echo_n "checking for $ac_word... " >&6; }
35201 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35202   $as_echo_n "(cached) " >&6
35203 else
35204   case $TOOLCHAIN_PATH_CXX in
35205   [\\/]* | ?:[\\/]*)
35206   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35207   ;;
35208   *)
35209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35210 for as_dir in $PATH
35211 do
35212   IFS=$as_save_IFS
35213   test -z "$as_dir" && as_dir=.
35214     for ac_exec_ext in '' $ac_executable_extensions; do
35215   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35216     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35218     break 2
35219   fi
35220 done
35221   done
35222 IFS=$as_save_IFS
35223 
35224   ;;
35225 esac
35226 fi
35227 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35228 if test -n "$TOOLCHAIN_PATH_CXX"; then
35229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35230 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35231 else
35232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35233 $as_echo "no" >&6; }
35234 fi
35235 
35236 
35237 fi
35238 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35239   ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35240   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35241 set dummy $SEARCH_LIST; ac_word=$2
35242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35243 $as_echo_n "checking for $ac_word... " >&6; }
35244 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35245   $as_echo_n "(cached) " >&6
35246 else
35247   case $ac_pt_TOOLCHAIN_PATH_CXX in
35248   [\\/]* | ?:[\\/]*)
35249   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35250   ;;
35251   *)
35252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35253 for as_dir in $PATH
35254 do
35255   IFS=$as_save_IFS
35256   test -z "$as_dir" && as_dir=.
35257     for ac_exec_ext in '' $ac_executable_extensions; do
35258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35259     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35261     break 2
35262   fi
35263 done
35264   done
35265 IFS=$as_save_IFS
35266 
35267   ;;
35268 esac
35269 fi
35270 ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35271 if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35273 $as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35274 else
35275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35276 $as_echo "no" >&6; }
35277 fi
35278 
35279   if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35280     TOOLCHAIN_PATH_CXX=""
35281   else
35282     case $cross_compiling:$ac_tool_warned in
35283 yes:)
35284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35285 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35286 ac_tool_warned=yes ;;
35287 esac
35288     TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35289   fi
35290 else
35291   TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35292 fi
35293 
35294       CXX=$TOOLCHAIN_PATH_CXX
35295       PATH="$PATH_save"
35296     fi
35297 
35298     # AC_PATH_TOOL can't be run multiple times with the same variable,
35299     # so create a new name for this run.
35300     if test "x$CXX" = x; then
35301       if test -n "$ac_tool_prefix"; then
35302   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35303 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35305 $as_echo_n "checking for $ac_word... " >&6; }
35306 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35307   $as_echo_n "(cached) " >&6
35308 else
35309   case $POTENTIAL_CXX in
35310   [\\/]* | ?:[\\/]*)
35311   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35312   ;;
35313   *)
35314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35315 for as_dir in $PATH
35316 do
35317   IFS=$as_save_IFS
35318   test -z "$as_dir" && as_dir=.
35319     for ac_exec_ext in '' $ac_executable_extensions; do
35320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35321     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35323     break 2
35324   fi
35325 done
35326   done
35327 IFS=$as_save_IFS
35328 
35329   ;;
35330 esac
35331 fi
35332 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35333 if test -n "$POTENTIAL_CXX"; then
35334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35335 $as_echo "$POTENTIAL_CXX" >&6; }
35336 else
35337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35338 $as_echo "no" >&6; }
35339 fi
35340 
35341 
35342 fi
35343 if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35344   ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35345   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35346 set dummy $SEARCH_LIST; ac_word=$2
35347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35348 $as_echo_n "checking for $ac_word... " >&6; }
35349 if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35350   $as_echo_n "(cached) " >&6
35351 else
35352   case $ac_pt_POTENTIAL_CXX in
35353   [\\/]* | ?:[\\/]*)
35354   ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35355   ;;
35356   *)
35357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35358 for as_dir in $PATH
35359 do
35360   IFS=$as_save_IFS
35361   test -z "$as_dir" && as_dir=.
35362     for ac_exec_ext in '' $ac_executable_extensions; do
35363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35364     ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35366     break 2
35367   fi
35368 done
35369   done
35370 IFS=$as_save_IFS
35371 
35372   ;;
35373 esac
35374 fi
35375 ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35376 if test -n "$ac_pt_POTENTIAL_CXX"; then
35377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35378 $as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35379 else
35380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35381 $as_echo "no" >&6; }
35382 fi
35383 
35384   if test "x$ac_pt_POTENTIAL_CXX" = x; then
35385     POTENTIAL_CXX=""
35386   else
35387     case $cross_compiling:$ac_tool_warned in
35388 yes:)
35389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35390 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35391 ac_tool_warned=yes ;;
35392 esac
35393     POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35394   fi
35395 else
35396   POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35397 fi
35398 
35399       CXX=$POTENTIAL_CXX
35400     fi
35401 
35402     if test "x$CXX" = x; then
35403 
35404   # Print a helpful message on how to acquire the necessary build dependency.
35405   # devkit is the help tag: freetype, cups, alsa etc
35406   MISSING_DEPENDENCY=devkit
35407 
35408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35409     cygwin_help $MISSING_DEPENDENCY
35410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35411     msys_help $MISSING_DEPENDENCY
35412   else
35413     PKGHANDLER_COMMAND=
35414 
35415     case $PKGHANDLER in
35416       apt-get)
35417         apt_help     $MISSING_DEPENDENCY ;;
35418       yum)
35419         yum_help     $MISSING_DEPENDENCY ;;
35420       brew)
35421         brew_help    $MISSING_DEPENDENCY ;;
35422       port)
35423         port_help    $MISSING_DEPENDENCY ;;
35424       pkgutil)
35425         pkgutil_help $MISSING_DEPENDENCY ;;
35426       pkgadd)
35427         pkgadd_help  $MISSING_DEPENDENCY ;;
35428     esac
35429 
35430     if test "x$PKGHANDLER_COMMAND" != x; then
35431       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35432     fi
35433   fi
35434 
35435       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35436     fi
35437   fi
35438 
35439   # Now we have a compiler binary in CXX. Make sure it's okay.
35440 
35441   # Only process if variable expands to non-empty
35442 
35443   if test "x$CXX" != x; then
35444     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35445 
35446   # First separate the path from the arguments. This will split at the first
35447   # space.
35448   complete="$CXX"
35449   path="${complete%% *}"
35450   tmp="$complete EOL"
35451   arguments="${tmp#* }"
35452 
35453   # Input might be given as Windows format, start by converting to
35454   # unix format.
35455   new_path=`$CYGPATH -u "$path"`
35456 
35457   # Now try to locate executable using which
35458   new_path=`$WHICH "$new_path" 2> /dev/null`
35459   # bat and cmd files are not always considered executable in cygwin causing which
35460   # to not find them
35461   if test "x$new_path" = x \
35462       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35463       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35464     new_path=`$CYGPATH -u "$path"`
35465   fi
35466   if test "x$new_path" = x; then
35467     # Oops. Which didn't find the executable.
35468     # The splitting of arguments from the executable at a space might have been incorrect,
35469     # since paths with space are more likely in Windows. Give it another try with the whole
35470     # argument.
35471     path="$complete"
35472     arguments="EOL"
35473     new_path=`$CYGPATH -u "$path"`
35474     new_path=`$WHICH "$new_path" 2> /dev/null`
35475     # bat and cmd files are not always considered executable in cygwin causing which
35476     # to not find them
35477     if test "x$new_path" = x \
35478         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35479         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35480       new_path=`$CYGPATH -u "$path"`
35481     fi
35482     if test "x$new_path" = x; then
35483       # It's still not found. Now this is an unrecoverable error.
35484       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35485 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35486       has_space=`$ECHO "$complete" | $GREP " "`
35487       if test "x$has_space" != x; then
35488         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35489 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35490       fi
35491       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35492     fi
35493   fi
35494 
35495   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35496   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35497   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35498   # "foo.exe" is OK but "foo" is an error.
35499   #
35500   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35501   # It is also a way to make sure we got the proper file name for the real test later on.
35502   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35503   if test "x$test_shortpath" = x; then
35504     # Short path failed, file does not exist as specified.
35505     # Try adding .exe or .cmd
35506     if test -f "${new_path}.exe"; then
35507       input_to_shortpath="${new_path}.exe"
35508     elif test -f "${new_path}.cmd"; then
35509       input_to_shortpath="${new_path}.cmd"
35510     else
35511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35512 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35513       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35514 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35515       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35516     fi
35517   else
35518     input_to_shortpath="$new_path"
35519   fi
35520 
35521   # Call helper function which possibly converts this using DOS-style short mode.
35522   # If so, the updated path is stored in $new_path.
35523   new_path="$input_to_shortpath"
35524 
35525   input_path="$input_to_shortpath"
35526   # Check if we need to convert this using DOS-style short mode. If the path
35527   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35528   # take no chances and rewrite it.
35529   # Note: m4 eats our [], so we need to use [ and ] instead.
35530   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35531   if test "x$has_forbidden_chars" != x; then
35532     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35533     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35534     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35535     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35536       # Going to short mode and back again did indeed matter. Since short mode is
35537       # case insensitive, let's make it lowercase to improve readability.
35538       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35539       # Now convert it back to Unix-style (cygpath)
35540       input_path=`$CYGPATH -u "$shortmode_path"`
35541       new_path="$input_path"
35542     fi
35543   fi
35544 
35545   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35546   if test "x$test_cygdrive_prefix" = x; then
35547     # As a simple fix, exclude /usr/bin since it's not a real path.
35548     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35549       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35550       # a path prefixed by /cygdrive for fixpath to work.
35551       new_path="$CYGWIN_ROOT_PATH$input_path"
35552     fi
35553   fi
35554 
35555   # remove trailing .exe if any
35556   new_path="${new_path/%.exe/}"
35557 
35558     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35559 
35560   # First separate the path from the arguments. This will split at the first
35561   # space.
35562   complete="$CXX"
35563   path="${complete%% *}"
35564   tmp="$complete EOL"
35565   arguments="${tmp#* }"
35566 
35567   # Input might be given as Windows format, start by converting to
35568   # unix format.
35569   new_path="$path"
35570 
35571   windows_path="$new_path"
35572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35573     unix_path=`$CYGPATH -u "$windows_path"`
35574     new_path="$unix_path"
35575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35576     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35577     new_path="$unix_path"
35578   fi
35579 
35580 
35581   # Now try to locate executable using which
35582   new_path=`$WHICH "$new_path" 2> /dev/null`
35583 
35584   if test "x$new_path" = x; then
35585     # Oops. Which didn't find the executable.
35586     # The splitting of arguments from the executable at a space might have been incorrect,
35587     # since paths with space are more likely in Windows. Give it another try with the whole
35588     # argument.
35589     path="$complete"
35590     arguments="EOL"
35591     new_path="$path"
35592 
35593   windows_path="$new_path"
35594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35595     unix_path=`$CYGPATH -u "$windows_path"`
35596     new_path="$unix_path"
35597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35598     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35599     new_path="$unix_path"
35600   fi
35601 
35602 
35603     new_path=`$WHICH "$new_path" 2> /dev/null`
35604     # bat and cmd files are not always considered executable in MSYS causing which
35605     # to not find them
35606     if test "x$new_path" = x \
35607         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35608         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35609       new_path="$path"
35610 
35611   windows_path="$new_path"
35612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35613     unix_path=`$CYGPATH -u "$windows_path"`
35614     new_path="$unix_path"
35615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35616     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35617     new_path="$unix_path"
35618   fi
35619 
35620     fi
35621 
35622     if test "x$new_path" = x; then
35623       # It's still not found. Now this is an unrecoverable error.
35624       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35625 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35626       has_space=`$ECHO "$complete" | $GREP " "`
35627       if test "x$has_space" != x; then
35628         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35629 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35630       fi
35631       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35632     fi
35633   fi
35634 
35635   # Now new_path has a complete unix path to the binary
35636   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35637     # Keep paths in /bin as-is, but remove trailing .exe if any
35638     new_path="${new_path/%.exe/}"
35639     # Do not save /bin paths to all_fixpath_prefixes!
35640   else
35641     # Not in mixed or Windows style, start by that.
35642     new_path=`cmd //c echo $new_path`
35643 
35644   input_path="$new_path"
35645   # Check if we need to convert this using DOS-style short mode. If the path
35646   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35647   # take no chances and rewrite it.
35648   # Note: m4 eats our [], so we need to use [ and ] instead.
35649   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35650   if test "x$has_forbidden_chars" != x; then
35651     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35652     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35653   fi
35654 
35655     # Output is in $new_path
35656 
35657   windows_path="$new_path"
35658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35659     unix_path=`$CYGPATH -u "$windows_path"`
35660     new_path="$unix_path"
35661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35663     new_path="$unix_path"
35664   fi
35665 
35666     # remove trailing .exe if any
35667     new_path="${new_path/%.exe/}"
35668 
35669     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35670     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35671   fi
35672 
35673     else
35674       # We're on a unix platform. Hooray! :)
35675       # First separate the path from the arguments. This will split at the first
35676       # space.
35677       complete="$CXX"
35678       path="${complete%% *}"
35679       tmp="$complete EOL"
35680       arguments="${tmp#* }"
35681 
35682       # Cannot rely on the command "which" here since it doesn't always work.
35683       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35684       if test -z "$is_absolute_path"; then
35685         # Path to executable is not absolute. Find it.
35686         IFS_save="$IFS"
35687         IFS=:
35688         for p in $PATH; do
35689           if test -f "$p/$path" && test -x "$p/$path"; then
35690             new_path="$p/$path"
35691             break
35692           fi
35693         done
35694         IFS="$IFS_save"
35695       else
35696         # This is an absolute path, we can use it without further modifications.
35697         new_path="$path"
35698       fi
35699 
35700       if test "x$new_path" = x; then
35701         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35702 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35703         has_space=`$ECHO "$complete" | $GREP " "`
35704         if test "x$has_space" != x; then
35705           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35706 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35707         fi
35708         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35709       fi
35710     fi
35711 
35712     # Now join together the path and the arguments once again
35713     if test "x$arguments" != xEOL; then
35714       new_complete="$new_path ${arguments% *}"
35715     else
35716       new_complete="$new_path"
35717     fi
35718 
35719     if test "x$complete" != "x$new_complete"; then
35720       CXX="$new_complete"
35721       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35722 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35723     fi
35724   fi
35725 
35726   TEST_COMPILER="$CXX"
35727 
35728   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35729 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35730   SYMLINK_ORIGINAL="$TEST_COMPILER"
35731 
35732   if test "x$OPENJDK_BUILD_OS" != xwindows; then
35733     # Follow a chain of symbolic links. Use readlink
35734     # where it exists, else fall back to horribly
35735     # complicated shell code.
35736     if test "x$READLINK_TESTED" != yes; then
35737       # On MacOSX there is a readlink tool with a different
35738       # purpose than the GNU readlink tool. Check the found readlink.
35739       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35740       if test "x$ISGNU" = x; then
35741         # A readlink that we do not know how to use.
35742         # Are there other non-GNU readlinks out there?
35743         READLINK_TESTED=yes
35744         READLINK=
35745       fi
35746     fi
35747 
35748     if test "x$READLINK" != x; then
35749       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35750     else
35751       # Save the current directory for restoring afterwards
35752       STARTDIR=$PWD
35753       COUNTER=0
35754       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35755       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35756       cd $sym_link_dir
35757       # Use -P flag to resolve symlinks in directories.
35758       cd `$THEPWDCMD -P`
35759       sym_link_dir=`$THEPWDCMD -P`
35760       # Resolve file symlinks
35761       while test $COUNTER -lt 20; do
35762         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35763         if test "x$ISLINK" == x; then
35764           # This is not a symbolic link! We are done!
35765           break
35766         fi
35767         # Again resolve directory symlinks since the target of the just found
35768         # link could be in a different directory
35769         cd `$DIRNAME $ISLINK`
35770         sym_link_dir=`$THEPWDCMD -P`
35771         sym_link_file=`$BASENAME $ISLINK`
35772         let COUNTER=COUNTER+1
35773       done
35774       cd $STARTDIR
35775       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35776     fi
35777   fi
35778 
35779   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35780     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35781 $as_echo "no symlink" >&6; }
35782   else
35783     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35784 $as_echo "$SYMLINK_ORIGINAL" >&6; }
35785 
35786     # We can't handle ccache by gcc wrappers, since we need to know if we're
35787     # using ccache. Instead ccache usage must be controlled by a configure option.
35788     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35789     if test "x$COMPILER_BASENAME" = "xccache"; then
35790       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35791 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35792       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35793     fi
35794   fi
35795 
35796 
35797   COMPILER=$CXX
35798   COMPILER_NAME=$COMPILER_NAME
35799 
35800   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35801     # cc -V output typically looks like
35802     #     cc: Sun C 5.12 Linux_i386 2011/11/16
35803     # or
35804     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35805     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35806     # Check that this is likely to be the Solaris Studio cc.
35807     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35808     if test $? -ne 0; then
35809       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35810       { $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
35811 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35812       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35813 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35814       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35815 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35816       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35817     fi
35818     # Remove usage instructions (if present), and
35819     # collapse compiler output into a single line
35820     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35821         $SED -e 's/ *[Uu]sage:.*//'`
35822     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35823         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35824   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35825     # xlc -qversion output typically looks like
35826     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35827     #     Version: 11.01.0000.0015
35828     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35829     # Check that this is likely to be the IBM XL C compiler.
35830     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35831     if test $? -ne 0; then
35832       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35833       { $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
35834 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35835       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35836 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35837       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35838 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35839       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35840     fi
35841     # Collapse compiler output into a single line
35842     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35843     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35844         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35845   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35846     # There is no specific version flag, but all output starts with a version string.
35847     # First line typically looks something like:
35848     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35849     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35850     # Check that this is likely to be Microsoft CL.EXE.
35851     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35852     if test $? -ne 0; then
35853       { $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
35854 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35855       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35856 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35857       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35858     fi
35859     # Collapse compiler output into a single line
35860     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35861     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35862         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35863   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35864     # gcc --version output typically looks like
35865     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35866     #     Copyright (C) 2013 Free Software Foundation, Inc.
35867     #     This is free software; see the source for copying conditions.  There is NO
35868     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35869     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35870     # Check that this is likely to be GCC.
35871     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35872     if test $? -ne 0; then
35873       { $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
35874 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35875       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35876 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35877       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35878     fi
35879     # Remove Copyright and legalese from version string, and
35880     # collapse into a single line
35881     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35882         $SED -e 's/ *Copyright .*//'`
35883     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35884         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35885   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35886     # clang --version output typically looks like
35887     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35888     #    clang version 3.3 (tags/RELEASE_33/final)
35889     # or
35890     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35891     #    Target: x86_64-pc-linux-gnu
35892     #    Thread model: posix
35893     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35894     # Check that this is likely to be clang
35895     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35896     if test $? -ne 0; then
35897       { $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
35898 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35899       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35900 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35901       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35902     fi
35903     # Collapse compiler output into a single line
35904     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35905     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35906         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35907   else
35908       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35909   fi
35910   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35911   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35912   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35913   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35914 
35915   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35916 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35917 
35918 
35919   # Now that we have resolved CXX ourself, let autoconf have its go at it
35920   ac_ext=cpp
35921 ac_cpp='$CXXCPP $CPPFLAGS'
35922 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35923 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35924 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35925 if test -z "$CXX"; then
35926   if test -n "$CCC"; then
35927     CXX=$CCC
35928   else
35929     if test -n "$ac_tool_prefix"; then
35930   for ac_prog in $CXX
35931   do
35932     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35933 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35935 $as_echo_n "checking for $ac_word... " >&6; }
35936 if ${ac_cv_prog_CXX+:} false; then :
35937   $as_echo_n "(cached) " >&6
35938 else
35939   if test -n "$CXX"; then
35940   ac_cv_prog_CXX="$CXX" # Let the user override the test.
35941 else
35942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35943 for as_dir in $PATH
35944 do
35945   IFS=$as_save_IFS
35946   test -z "$as_dir" && as_dir=.
35947     for ac_exec_ext in '' $ac_executable_extensions; do
35948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35949     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35951     break 2
35952   fi
35953 done
35954   done
35955 IFS=$as_save_IFS
35956 
35957 fi
35958 fi
35959 CXX=$ac_cv_prog_CXX
35960 if test -n "$CXX"; then
35961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35962 $as_echo "$CXX" >&6; }
35963 else
35964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35965 $as_echo "no" >&6; }
35966 fi
35967 
35968 
35969     test -n "$CXX" && break
35970   done
35971 fi
35972 if test -z "$CXX"; then
35973   ac_ct_CXX=$CXX
35974   for ac_prog in $CXX
35975 do
35976   # Extract the first word of "$ac_prog", so it can be a program name with args.
35977 set dummy $ac_prog; ac_word=$2
35978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35979 $as_echo_n "checking for $ac_word... " >&6; }
35980 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35981   $as_echo_n "(cached) " >&6
35982 else
35983   if test -n "$ac_ct_CXX"; then
35984   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35985 else
35986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35987 for as_dir in $PATH
35988 do
35989   IFS=$as_save_IFS
35990   test -z "$as_dir" && as_dir=.
35991     for ac_exec_ext in '' $ac_executable_extensions; do
35992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35993     ac_cv_prog_ac_ct_CXX="$ac_prog"
35994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35995     break 2
35996   fi
35997 done
35998   done
35999 IFS=$as_save_IFS
36000 
36001 fi
36002 fi
36003 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36004 if test -n "$ac_ct_CXX"; then
36005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36006 $as_echo "$ac_ct_CXX" >&6; }
36007 else
36008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36009 $as_echo "no" >&6; }
36010 fi
36011 
36012 
36013   test -n "$ac_ct_CXX" && break
36014 done
36015 
36016   if test "x$ac_ct_CXX" = x; then
36017     CXX="g++"
36018   else
36019     case $cross_compiling:$ac_tool_warned in
36020 yes:)
36021 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36022 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36023 ac_tool_warned=yes ;;
36024 esac
36025     CXX=$ac_ct_CXX
36026   fi
36027 fi
36028 
36029   fi
36030 fi
36031 # Provide some information about the compiler.
36032 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36033 set X $ac_compile
36034 ac_compiler=$2
36035 for ac_option in --version -v -V -qversion; do
36036   { { ac_try="$ac_compiler $ac_option >&5"
36037 case "(($ac_try" in
36038   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36039   *) ac_try_echo=$ac_try;;
36040 esac
36041 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36042 $as_echo "$ac_try_echo"; } >&5
36043   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36044   ac_status=$?
36045   if test -s conftest.err; then
36046     sed '10a\
36047 ... rest of stderr output deleted ...
36048          10q' conftest.err >conftest.er1
36049     cat conftest.er1 >&5
36050   fi
36051   rm -f conftest.er1 conftest.err
36052   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36053   test $ac_status = 0; }
36054 done
36055 
36056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36057 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36058 if ${ac_cv_cxx_compiler_gnu+:} false; then :
36059   $as_echo_n "(cached) " >&6
36060 else
36061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36062 /* end confdefs.h.  */
36063 
36064 int
36065 main ()
36066 {
36067 #ifndef __GNUC__
36068        choke me
36069 #endif
36070 
36071   ;
36072   return 0;
36073 }
36074 _ACEOF
36075 if ac_fn_cxx_try_compile "$LINENO"; then :
36076   ac_compiler_gnu=yes
36077 else
36078   ac_compiler_gnu=no
36079 fi
36080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36081 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36082 
36083 fi
36084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36085 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36086 if test $ac_compiler_gnu = yes; then
36087   GXX=yes
36088 else
36089   GXX=
36090 fi
36091 ac_test_CXXFLAGS=${CXXFLAGS+set}
36092 ac_save_CXXFLAGS=$CXXFLAGS
36093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36094 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
36095 if ${ac_cv_prog_cxx_g+:} false; then :
36096   $as_echo_n "(cached) " >&6
36097 else
36098   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36099    ac_cxx_werror_flag=yes
36100    ac_cv_prog_cxx_g=no
36101    CXXFLAGS="-g"
36102    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36103 /* end confdefs.h.  */
36104 
36105 int
36106 main ()
36107 {
36108 
36109   ;
36110   return 0;
36111 }
36112 _ACEOF
36113 if ac_fn_cxx_try_compile "$LINENO"; then :
36114   ac_cv_prog_cxx_g=yes
36115 else
36116   CXXFLAGS=""
36117       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36118 /* end confdefs.h.  */
36119 
36120 int
36121 main ()
36122 {
36123 
36124   ;
36125   return 0;
36126 }
36127 _ACEOF
36128 if ac_fn_cxx_try_compile "$LINENO"; then :
36129 
36130 else
36131   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36132          CXXFLAGS="-g"
36133          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36134 /* end confdefs.h.  */
36135 
36136 int
36137 main ()
36138 {
36139 
36140   ;
36141   return 0;
36142 }
36143 _ACEOF
36144 if ac_fn_cxx_try_compile "$LINENO"; then :
36145   ac_cv_prog_cxx_g=yes
36146 fi
36147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36148 fi
36149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36150 fi
36151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36152    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36153 fi
36154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36155 $as_echo "$ac_cv_prog_cxx_g" >&6; }
36156 if test "$ac_test_CXXFLAGS" = set; then
36157   CXXFLAGS=$ac_save_CXXFLAGS
36158 elif test $ac_cv_prog_cxx_g = yes; then
36159   if test "$GXX" = yes; then
36160     CXXFLAGS="-g -O2"
36161   else
36162     CXXFLAGS="-g"
36163   fi
36164 else
36165   if test "$GXX" = yes; then
36166     CXXFLAGS="-O2"
36167   else
36168     CXXFLAGS=
36169   fi
36170 fi
36171 ac_ext=cpp
36172 ac_cpp='$CXXCPP $CPPFLAGS'
36173 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36174 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36175 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36176 
36177 
36178   # This is the compiler version number on the form X.Y[.Z]
36179 
36180 
36181 
36182 
36183   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36184     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36185 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36186     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36187 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36188   fi
36189 
36190   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36191   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36192     { $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
36193 $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;}
36194   fi
36195 
36196   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36197     { $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
36198 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36199   fi
36200 
36201   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36202 
36203 
36204   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36205 
36206 
36207 
36208 
36209 
36210 
36211 
36212 
36213 
36214 
36215 
36216 
36217 
36218 
36219 
36220 
36221 
36222 
36223 
36224 
36225 
36226 
36227 
36228 
36229 
36230 
36231 
36232 
36233 
36234 
36235 
36236 
36237 
36238 
36239 
36240 
36241 
36242 
36243 
36244 
36245 
36246 
36247 
36248 
36249 
36250 
36251 
36252 
36253 
36254     # Execute function body
36255 
36256   # Need to assign to a variable since m4 is blocked from modifying parts in [].
36257   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36258 
36259   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36260     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36261   fi
36262 
36263   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36264     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36265   fi
36266 
36267   # Version comparison method inspired by http://stackoverflow.com/a/24067243
36268   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36269 
36270   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36271     :
36272 
36273   else
36274     :
36275 
36276           { $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
36277 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36278 
36279 
36280   fi
36281 
36282 
36283 
36284 
36285 
36286 
36287 
36288 
36289 
36290 
36291 
36292 
36293 
36294 
36295   fi
36296 
36297   #
36298   # Setup the preprocessor (CPP and CXXCPP)
36299   #
36300   ac_ext=c
36301 ac_cpp='$CPP $CPPFLAGS'
36302 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36303 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36304 ac_compiler_gnu=$ac_cv_c_compiler_gnu
36305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36306 $as_echo_n "checking how to run the C preprocessor... " >&6; }
36307 # On Suns, sometimes $CPP names a directory.
36308 if test -n "$CPP" && test -d "$CPP"; then
36309   CPP=
36310 fi
36311 if test -z "$CPP"; then
36312   if ${ac_cv_prog_CPP+:} false; then :
36313   $as_echo_n "(cached) " >&6
36314 else
36315       # Double quotes because CPP needs to be expanded
36316     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36317     do
36318       ac_preproc_ok=false
36319 for ac_c_preproc_warn_flag in '' yes
36320 do
36321   # Use a header file that comes with gcc, so configuring glibc
36322   # with a fresh cross-compiler works.
36323   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36324   # <limits.h> exists even on freestanding compilers.
36325   # On the NeXT, cc -E runs the code through the compiler's parser,
36326   # not just through cpp. "Syntax error" is here to catch this case.
36327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36328 /* end confdefs.h.  */
36329 #ifdef __STDC__
36330 # include <limits.h>
36331 #else
36332 # include <assert.h>
36333 #endif
36334                      Syntax error
36335 _ACEOF
36336 if ac_fn_c_try_cpp "$LINENO"; then :
36337 
36338 else
36339   # Broken: fails on valid input.
36340 continue
36341 fi
36342 rm -f conftest.err conftest.i conftest.$ac_ext
36343 
36344   # OK, works on sane cases.  Now check whether nonexistent headers
36345   # can be detected and how.
36346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36347 /* end confdefs.h.  */
36348 #include <ac_nonexistent.h>
36349 _ACEOF
36350 if ac_fn_c_try_cpp "$LINENO"; then :
36351   # Broken: success on invalid input.
36352 continue
36353 else
36354   # Passes both tests.
36355 ac_preproc_ok=:
36356 break
36357 fi
36358 rm -f conftest.err conftest.i conftest.$ac_ext
36359 
36360 done
36361 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36362 rm -f conftest.i conftest.err conftest.$ac_ext
36363 if $ac_preproc_ok; then :
36364   break
36365 fi
36366 
36367     done
36368     ac_cv_prog_CPP=$CPP
36369 
36370 fi
36371   CPP=$ac_cv_prog_CPP
36372 else
36373   ac_cv_prog_CPP=$CPP
36374 fi
36375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36376 $as_echo "$CPP" >&6; }
36377 ac_preproc_ok=false
36378 for ac_c_preproc_warn_flag in '' yes
36379 do
36380   # Use a header file that comes with gcc, so configuring glibc
36381   # with a fresh cross-compiler works.
36382   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36383   # <limits.h> exists even on freestanding compilers.
36384   # On the NeXT, cc -E runs the code through the compiler's parser,
36385   # not just through cpp. "Syntax error" is here to catch this case.
36386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36387 /* end confdefs.h.  */
36388 #ifdef __STDC__
36389 # include <limits.h>
36390 #else
36391 # include <assert.h>
36392 #endif
36393                      Syntax error
36394 _ACEOF
36395 if ac_fn_c_try_cpp "$LINENO"; then :
36396 
36397 else
36398   # Broken: fails on valid input.
36399 continue
36400 fi
36401 rm -f conftest.err conftest.i conftest.$ac_ext
36402 
36403   # OK, works on sane cases.  Now check whether nonexistent headers
36404   # can be detected and how.
36405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36406 /* end confdefs.h.  */
36407 #include <ac_nonexistent.h>
36408 _ACEOF
36409 if ac_fn_c_try_cpp "$LINENO"; then :
36410   # Broken: success on invalid input.
36411 continue
36412 else
36413   # Passes both tests.
36414 ac_preproc_ok=:
36415 break
36416 fi
36417 rm -f conftest.err conftest.i conftest.$ac_ext
36418 
36419 done
36420 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36421 rm -f conftest.i conftest.err conftest.$ac_ext
36422 if $ac_preproc_ok; then :
36423 
36424 else
36425   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36426 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36427 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36428 See \`config.log' for more details" "$LINENO" 5; }
36429 fi
36430 
36431 ac_ext=cpp
36432 ac_cpp='$CXXCPP $CPPFLAGS'
36433 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36434 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36435 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36436 
36437 
36438   # Only process if variable expands to non-empty
36439 
36440   if test "x$CPP" != x; then
36441     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36442 
36443   # First separate the path from the arguments. This will split at the first
36444   # space.
36445   complete="$CPP"
36446   path="${complete%% *}"
36447   tmp="$complete EOL"
36448   arguments="${tmp#* }"
36449 
36450   # Input might be given as Windows format, start by converting to
36451   # unix format.
36452   new_path=`$CYGPATH -u "$path"`
36453 
36454   # Now try to locate executable using which
36455   new_path=`$WHICH "$new_path" 2> /dev/null`
36456   # bat and cmd files are not always considered executable in cygwin causing which
36457   # to not find them
36458   if test "x$new_path" = x \
36459       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36460       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36461     new_path=`$CYGPATH -u "$path"`
36462   fi
36463   if test "x$new_path" = x; then
36464     # Oops. Which didn't find the executable.
36465     # The splitting of arguments from the executable at a space might have been incorrect,
36466     # since paths with space are more likely in Windows. Give it another try with the whole
36467     # argument.
36468     path="$complete"
36469     arguments="EOL"
36470     new_path=`$CYGPATH -u "$path"`
36471     new_path=`$WHICH "$new_path" 2> /dev/null`
36472     # bat and cmd files are not always considered executable in cygwin causing which
36473     # to not find them
36474     if test "x$new_path" = x \
36475         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36476         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36477       new_path=`$CYGPATH -u "$path"`
36478     fi
36479     if test "x$new_path" = x; then
36480       # It's still not found. Now this is an unrecoverable error.
36481       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36482 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36483       has_space=`$ECHO "$complete" | $GREP " "`
36484       if test "x$has_space" != x; then
36485         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36486 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36487       fi
36488       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36489     fi
36490   fi
36491 
36492   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36493   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36494   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36495   # "foo.exe" is OK but "foo" is an error.
36496   #
36497   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36498   # It is also a way to make sure we got the proper file name for the real test later on.
36499   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36500   if test "x$test_shortpath" = x; then
36501     # Short path failed, file does not exist as specified.
36502     # Try adding .exe or .cmd
36503     if test -f "${new_path}.exe"; then
36504       input_to_shortpath="${new_path}.exe"
36505     elif test -f "${new_path}.cmd"; then
36506       input_to_shortpath="${new_path}.cmd"
36507     else
36508       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36509 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36510       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36511 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36512       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36513     fi
36514   else
36515     input_to_shortpath="$new_path"
36516   fi
36517 
36518   # Call helper function which possibly converts this using DOS-style short mode.
36519   # If so, the updated path is stored in $new_path.
36520   new_path="$input_to_shortpath"
36521 
36522   input_path="$input_to_shortpath"
36523   # Check if we need to convert this using DOS-style short mode. If the path
36524   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36525   # take no chances and rewrite it.
36526   # Note: m4 eats our [], so we need to use [ and ] instead.
36527   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36528   if test "x$has_forbidden_chars" != x; then
36529     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36530     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36531     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36532     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36533       # Going to short mode and back again did indeed matter. Since short mode is
36534       # case insensitive, let's make it lowercase to improve readability.
36535       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36536       # Now convert it back to Unix-style (cygpath)
36537       input_path=`$CYGPATH -u "$shortmode_path"`
36538       new_path="$input_path"
36539     fi
36540   fi
36541 
36542   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36543   if test "x$test_cygdrive_prefix" = x; then
36544     # As a simple fix, exclude /usr/bin since it's not a real path.
36545     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36546       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36547       # a path prefixed by /cygdrive for fixpath to work.
36548       new_path="$CYGWIN_ROOT_PATH$input_path"
36549     fi
36550   fi
36551 
36552   # remove trailing .exe if any
36553   new_path="${new_path/%.exe/}"
36554 
36555     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36556 
36557   # First separate the path from the arguments. This will split at the first
36558   # space.
36559   complete="$CPP"
36560   path="${complete%% *}"
36561   tmp="$complete EOL"
36562   arguments="${tmp#* }"
36563 
36564   # Input might be given as Windows format, start by converting to
36565   # unix format.
36566   new_path="$path"
36567 
36568   windows_path="$new_path"
36569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36570     unix_path=`$CYGPATH -u "$windows_path"`
36571     new_path="$unix_path"
36572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36573     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36574     new_path="$unix_path"
36575   fi
36576 
36577 
36578   # Now try to locate executable using which
36579   new_path=`$WHICH "$new_path" 2> /dev/null`
36580 
36581   if test "x$new_path" = x; then
36582     # Oops. Which didn't find the executable.
36583     # The splitting of arguments from the executable at a space might have been incorrect,
36584     # since paths with space are more likely in Windows. Give it another try with the whole
36585     # argument.
36586     path="$complete"
36587     arguments="EOL"
36588     new_path="$path"
36589 
36590   windows_path="$new_path"
36591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36592     unix_path=`$CYGPATH -u "$windows_path"`
36593     new_path="$unix_path"
36594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36595     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36596     new_path="$unix_path"
36597   fi
36598 
36599 
36600     new_path=`$WHICH "$new_path" 2> /dev/null`
36601     # bat and cmd files are not always considered executable in MSYS causing which
36602     # to not find them
36603     if test "x$new_path" = x \
36604         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36605         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36606       new_path="$path"
36607 
36608   windows_path="$new_path"
36609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36610     unix_path=`$CYGPATH -u "$windows_path"`
36611     new_path="$unix_path"
36612   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36613     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36614     new_path="$unix_path"
36615   fi
36616 
36617     fi
36618 
36619     if test "x$new_path" = x; then
36620       # It's still not found. Now this is an unrecoverable error.
36621       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36622 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36623       has_space=`$ECHO "$complete" | $GREP " "`
36624       if test "x$has_space" != x; then
36625         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36626 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36627       fi
36628       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36629     fi
36630   fi
36631 
36632   # Now new_path has a complete unix path to the binary
36633   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36634     # Keep paths in /bin as-is, but remove trailing .exe if any
36635     new_path="${new_path/%.exe/}"
36636     # Do not save /bin paths to all_fixpath_prefixes!
36637   else
36638     # Not in mixed or Windows style, start by that.
36639     new_path=`cmd //c echo $new_path`
36640 
36641   input_path="$new_path"
36642   # Check if we need to convert this using DOS-style short mode. If the path
36643   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36644   # take no chances and rewrite it.
36645   # Note: m4 eats our [], so we need to use [ and ] instead.
36646   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36647   if test "x$has_forbidden_chars" != x; then
36648     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36649     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36650   fi
36651 
36652     # Output is in $new_path
36653 
36654   windows_path="$new_path"
36655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36656     unix_path=`$CYGPATH -u "$windows_path"`
36657     new_path="$unix_path"
36658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36660     new_path="$unix_path"
36661   fi
36662 
36663     # remove trailing .exe if any
36664     new_path="${new_path/%.exe/}"
36665 
36666     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36667     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36668   fi
36669 
36670     else
36671       # We're on a unix platform. Hooray! :)
36672       # First separate the path from the arguments. This will split at the first
36673       # space.
36674       complete="$CPP"
36675       path="${complete%% *}"
36676       tmp="$complete EOL"
36677       arguments="${tmp#* }"
36678 
36679       # Cannot rely on the command "which" here since it doesn't always work.
36680       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36681       if test -z "$is_absolute_path"; then
36682         # Path to executable is not absolute. Find it.
36683         IFS_save="$IFS"
36684         IFS=:
36685         for p in $PATH; do
36686           if test -f "$p/$path" && test -x "$p/$path"; then
36687             new_path="$p/$path"
36688             break
36689           fi
36690         done
36691         IFS="$IFS_save"
36692       else
36693         # This is an absolute path, we can use it without further modifications.
36694         new_path="$path"
36695       fi
36696 
36697       if test "x$new_path" = x; then
36698         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36699 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36700         has_space=`$ECHO "$complete" | $GREP " "`
36701         if test "x$has_space" != x; then
36702           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36703 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36704         fi
36705         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36706       fi
36707     fi
36708 
36709     # Now join together the path and the arguments once again
36710     if test "x$arguments" != xEOL; then
36711       new_complete="$new_path ${arguments% *}"
36712     else
36713       new_complete="$new_path"
36714     fi
36715 
36716     if test "x$complete" != "x$new_complete"; then
36717       CPP="$new_complete"
36718       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36719 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36720     fi
36721   fi
36722 
36723   ac_ext=cpp
36724 ac_cpp='$CXXCPP $CPPFLAGS'
36725 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36726 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36727 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36729 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36730 if test -z "$CXXCPP"; then
36731   if ${ac_cv_prog_CXXCPP+:} false; then :
36732   $as_echo_n "(cached) " >&6
36733 else
36734       # Double quotes because CXXCPP needs to be expanded
36735     for CXXCPP in "$CXX -E" "/lib/cpp"
36736     do
36737       ac_preproc_ok=false
36738 for ac_cxx_preproc_warn_flag in '' yes
36739 do
36740   # Use a header file that comes with gcc, so configuring glibc
36741   # with a fresh cross-compiler works.
36742   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36743   # <limits.h> exists even on freestanding compilers.
36744   # On the NeXT, cc -E runs the code through the compiler's parser,
36745   # not just through cpp. "Syntax error" is here to catch this case.
36746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36747 /* end confdefs.h.  */
36748 #ifdef __STDC__
36749 # include <limits.h>
36750 #else
36751 # include <assert.h>
36752 #endif
36753                      Syntax error
36754 _ACEOF
36755 if ac_fn_cxx_try_cpp "$LINENO"; then :
36756 
36757 else
36758   # Broken: fails on valid input.
36759 continue
36760 fi
36761 rm -f conftest.err conftest.i conftest.$ac_ext
36762 
36763   # OK, works on sane cases.  Now check whether nonexistent headers
36764   # can be detected and how.
36765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36766 /* end confdefs.h.  */
36767 #include <ac_nonexistent.h>
36768 _ACEOF
36769 if ac_fn_cxx_try_cpp "$LINENO"; then :
36770   # Broken: success on invalid input.
36771 continue
36772 else
36773   # Passes both tests.
36774 ac_preproc_ok=:
36775 break
36776 fi
36777 rm -f conftest.err conftest.i conftest.$ac_ext
36778 
36779 done
36780 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36781 rm -f conftest.i conftest.err conftest.$ac_ext
36782 if $ac_preproc_ok; then :
36783   break
36784 fi
36785 
36786     done
36787     ac_cv_prog_CXXCPP=$CXXCPP
36788 
36789 fi
36790   CXXCPP=$ac_cv_prog_CXXCPP
36791 else
36792   ac_cv_prog_CXXCPP=$CXXCPP
36793 fi
36794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36795 $as_echo "$CXXCPP" >&6; }
36796 ac_preproc_ok=false
36797 for ac_cxx_preproc_warn_flag in '' yes
36798 do
36799   # Use a header file that comes with gcc, so configuring glibc
36800   # with a fresh cross-compiler works.
36801   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36802   # <limits.h> exists even on freestanding compilers.
36803   # On the NeXT, cc -E runs the code through the compiler's parser,
36804   # not just through cpp. "Syntax error" is here to catch this case.
36805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36806 /* end confdefs.h.  */
36807 #ifdef __STDC__
36808 # include <limits.h>
36809 #else
36810 # include <assert.h>
36811 #endif
36812                      Syntax error
36813 _ACEOF
36814 if ac_fn_cxx_try_cpp "$LINENO"; then :
36815 
36816 else
36817   # Broken: fails on valid input.
36818 continue
36819 fi
36820 rm -f conftest.err conftest.i conftest.$ac_ext
36821 
36822   # OK, works on sane cases.  Now check whether nonexistent headers
36823   # can be detected and how.
36824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36825 /* end confdefs.h.  */
36826 #include <ac_nonexistent.h>
36827 _ACEOF
36828 if ac_fn_cxx_try_cpp "$LINENO"; then :
36829   # Broken: success on invalid input.
36830 continue
36831 else
36832   # Passes both tests.
36833 ac_preproc_ok=:
36834 break
36835 fi
36836 rm -f conftest.err conftest.i conftest.$ac_ext
36837 
36838 done
36839 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36840 rm -f conftest.i conftest.err conftest.$ac_ext
36841 if $ac_preproc_ok; then :
36842 
36843 else
36844   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36845 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36846 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36847 See \`config.log' for more details" "$LINENO" 5; }
36848 fi
36849 
36850 ac_ext=cpp
36851 ac_cpp='$CXXCPP $CPPFLAGS'
36852 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36853 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36854 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36855 
36856 
36857   # Only process if variable expands to non-empty
36858 
36859   if test "x$CXXCPP" != x; then
36860     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36861 
36862   # First separate the path from the arguments. This will split at the first
36863   # space.
36864   complete="$CXXCPP"
36865   path="${complete%% *}"
36866   tmp="$complete EOL"
36867   arguments="${tmp#* }"
36868 
36869   # Input might be given as Windows format, start by converting to
36870   # unix format.
36871   new_path=`$CYGPATH -u "$path"`
36872 
36873   # Now try to locate executable using which
36874   new_path=`$WHICH "$new_path" 2> /dev/null`
36875   # bat and cmd files are not always considered executable in cygwin causing which
36876   # to not find them
36877   if test "x$new_path" = x \
36878       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36879       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36880     new_path=`$CYGPATH -u "$path"`
36881   fi
36882   if test "x$new_path" = x; then
36883     # Oops. Which didn't find the executable.
36884     # The splitting of arguments from the executable at a space might have been incorrect,
36885     # since paths with space are more likely in Windows. Give it another try with the whole
36886     # argument.
36887     path="$complete"
36888     arguments="EOL"
36889     new_path=`$CYGPATH -u "$path"`
36890     new_path=`$WHICH "$new_path" 2> /dev/null`
36891     # bat and cmd files are not always considered executable in cygwin causing which
36892     # to not find them
36893     if test "x$new_path" = x \
36894         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36895         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36896       new_path=`$CYGPATH -u "$path"`
36897     fi
36898     if test "x$new_path" = x; then
36899       # It's still not found. Now this is an unrecoverable error.
36900       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36901 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36902       has_space=`$ECHO "$complete" | $GREP " "`
36903       if test "x$has_space" != x; then
36904         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36905 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36906       fi
36907       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36908     fi
36909   fi
36910 
36911   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36912   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36913   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36914   # "foo.exe" is OK but "foo" is an error.
36915   #
36916   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36917   # It is also a way to make sure we got the proper file name for the real test later on.
36918   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36919   if test "x$test_shortpath" = x; then
36920     # Short path failed, file does not exist as specified.
36921     # Try adding .exe or .cmd
36922     if test -f "${new_path}.exe"; then
36923       input_to_shortpath="${new_path}.exe"
36924     elif test -f "${new_path}.cmd"; then
36925       input_to_shortpath="${new_path}.cmd"
36926     else
36927       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36928 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36929       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36930 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36931       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36932     fi
36933   else
36934     input_to_shortpath="$new_path"
36935   fi
36936 
36937   # Call helper function which possibly converts this using DOS-style short mode.
36938   # If so, the updated path is stored in $new_path.
36939   new_path="$input_to_shortpath"
36940 
36941   input_path="$input_to_shortpath"
36942   # Check if we need to convert this using DOS-style short mode. If the path
36943   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36944   # take no chances and rewrite it.
36945   # Note: m4 eats our [], so we need to use [ and ] instead.
36946   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36947   if test "x$has_forbidden_chars" != x; then
36948     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36949     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36950     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36951     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36952       # Going to short mode and back again did indeed matter. Since short mode is
36953       # case insensitive, let's make it lowercase to improve readability.
36954       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36955       # Now convert it back to Unix-style (cygpath)
36956       input_path=`$CYGPATH -u "$shortmode_path"`
36957       new_path="$input_path"
36958     fi
36959   fi
36960 
36961   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36962   if test "x$test_cygdrive_prefix" = x; then
36963     # As a simple fix, exclude /usr/bin since it's not a real path.
36964     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36965       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36966       # a path prefixed by /cygdrive for fixpath to work.
36967       new_path="$CYGWIN_ROOT_PATH$input_path"
36968     fi
36969   fi
36970 
36971   # remove trailing .exe if any
36972   new_path="${new_path/%.exe/}"
36973 
36974     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36975 
36976   # First separate the path from the arguments. This will split at the first
36977   # space.
36978   complete="$CXXCPP"
36979   path="${complete%% *}"
36980   tmp="$complete EOL"
36981   arguments="${tmp#* }"
36982 
36983   # Input might be given as Windows format, start by converting to
36984   # unix format.
36985   new_path="$path"
36986 
36987   windows_path="$new_path"
36988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36989     unix_path=`$CYGPATH -u "$windows_path"`
36990     new_path="$unix_path"
36991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36992     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36993     new_path="$unix_path"
36994   fi
36995 
36996 
36997   # Now try to locate executable using which
36998   new_path=`$WHICH "$new_path" 2> /dev/null`
36999 
37000   if test "x$new_path" = x; then
37001     # Oops. Which didn't find the executable.
37002     # The splitting of arguments from the executable at a space might have been incorrect,
37003     # since paths with space are more likely in Windows. Give it another try with the whole
37004     # argument.
37005     path="$complete"
37006     arguments="EOL"
37007     new_path="$path"
37008 
37009   windows_path="$new_path"
37010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37011     unix_path=`$CYGPATH -u "$windows_path"`
37012     new_path="$unix_path"
37013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37015     new_path="$unix_path"
37016   fi
37017 
37018 
37019     new_path=`$WHICH "$new_path" 2> /dev/null`
37020     # bat and cmd files are not always considered executable in MSYS causing which
37021     # to not find them
37022     if test "x$new_path" = x \
37023         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37024         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37025       new_path="$path"
37026 
37027   windows_path="$new_path"
37028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37029     unix_path=`$CYGPATH -u "$windows_path"`
37030     new_path="$unix_path"
37031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37033     new_path="$unix_path"
37034   fi
37035 
37036     fi
37037 
37038     if test "x$new_path" = x; then
37039       # It's still not found. Now this is an unrecoverable error.
37040       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37041 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37042       has_space=`$ECHO "$complete" | $GREP " "`
37043       if test "x$has_space" != x; then
37044         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37045 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37046       fi
37047       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37048     fi
37049   fi
37050 
37051   # Now new_path has a complete unix path to the binary
37052   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37053     # Keep paths in /bin as-is, but remove trailing .exe if any
37054     new_path="${new_path/%.exe/}"
37055     # Do not save /bin paths to all_fixpath_prefixes!
37056   else
37057     # Not in mixed or Windows style, start by that.
37058     new_path=`cmd //c echo $new_path`
37059 
37060   input_path="$new_path"
37061   # Check if we need to convert this using DOS-style short mode. If the path
37062   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37063   # take no chances and rewrite it.
37064   # Note: m4 eats our [], so we need to use [ and ] instead.
37065   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37066   if test "x$has_forbidden_chars" != x; then
37067     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37068     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37069   fi
37070 
37071     # Output is in $new_path
37072 
37073   windows_path="$new_path"
37074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37075     unix_path=`$CYGPATH -u "$windows_path"`
37076     new_path="$unix_path"
37077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37079     new_path="$unix_path"
37080   fi
37081 
37082     # remove trailing .exe if any
37083     new_path="${new_path/%.exe/}"
37084 
37085     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37086     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37087   fi
37088 
37089     else
37090       # We're on a unix platform. Hooray! :)
37091       # First separate the path from the arguments. This will split at the first
37092       # space.
37093       complete="$CXXCPP"
37094       path="${complete%% *}"
37095       tmp="$complete EOL"
37096       arguments="${tmp#* }"
37097 
37098       # Cannot rely on the command "which" here since it doesn't always work.
37099       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37100       if test -z "$is_absolute_path"; then
37101         # Path to executable is not absolute. Find it.
37102         IFS_save="$IFS"
37103         IFS=:
37104         for p in $PATH; do
37105           if test -f "$p/$path" && test -x "$p/$path"; then
37106             new_path="$p/$path"
37107             break
37108           fi
37109         done
37110         IFS="$IFS_save"
37111       else
37112         # This is an absolute path, we can use it without further modifications.
37113         new_path="$path"
37114       fi
37115 
37116       if test "x$new_path" = x; then
37117         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37118 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37119         has_space=`$ECHO "$complete" | $GREP " "`
37120         if test "x$has_space" != x; then
37121           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37122 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37123         fi
37124         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37125       fi
37126     fi
37127 
37128     # Now join together the path and the arguments once again
37129     if test "x$arguments" != xEOL; then
37130       new_complete="$new_path ${arguments% *}"
37131     else
37132       new_complete="$new_path"
37133     fi
37134 
37135     if test "x$complete" != "x$new_complete"; then
37136       CXXCPP="$new_complete"
37137       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37138 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37139     fi
37140   fi
37141 
37142 
37143   #
37144   # Setup the linker (LD)
37145   #
37146   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37147     # In the Microsoft toolchain we have a separate LD command "link".
37148     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37149     # a cygwin program for something completely different.
37150     # Extract the first word of "link", so it can be a program name with args.
37151 set dummy link; ac_word=$2
37152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37153 $as_echo_n "checking for $ac_word... " >&6; }
37154 if ${ac_cv_prog_LD+:} false; then :
37155   $as_echo_n "(cached) " >&6
37156 else
37157   if test -n "$LD"; then
37158   ac_cv_prog_LD="$LD" # Let the user override the test.
37159 else
37160   ac_prog_rejected=no
37161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37162 for as_dir in $PATH
37163 do
37164   IFS=$as_save_IFS
37165   test -z "$as_dir" && as_dir=.
37166     for ac_exec_ext in '' $ac_executable_extensions; do
37167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37168     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37169        ac_prog_rejected=yes
37170        continue
37171      fi
37172     ac_cv_prog_LD="link"
37173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37174     break 2
37175   fi
37176 done
37177   done
37178 IFS=$as_save_IFS
37179 
37180 if test $ac_prog_rejected = yes; then
37181   # We found a bogon in the path, so make sure we never use it.
37182   set dummy $ac_cv_prog_LD
37183   shift
37184   if test $# != 0; then
37185     # We chose a different compiler from the bogus one.
37186     # However, it has the same basename, so the bogon will be chosen
37187     # first if we set LD to just the basename; use the full file name.
37188     shift
37189     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37190   fi
37191 fi
37192 fi
37193 fi
37194 LD=$ac_cv_prog_LD
37195 if test -n "$LD"; then
37196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37197 $as_echo "$LD" >&6; }
37198 else
37199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37200 $as_echo "no" >&6; }
37201 fi
37202 
37203 
37204 
37205   # Only process if variable expands to non-empty
37206 
37207   if test "x$LD" != x; then
37208     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37209 
37210   # First separate the path from the arguments. This will split at the first
37211   # space.
37212   complete="$LD"
37213   path="${complete%% *}"
37214   tmp="$complete EOL"
37215   arguments="${tmp#* }"
37216 
37217   # Input might be given as Windows format, start by converting to
37218   # unix format.
37219   new_path=`$CYGPATH -u "$path"`
37220 
37221   # Now try to locate executable using which
37222   new_path=`$WHICH "$new_path" 2> /dev/null`
37223   # bat and cmd files are not always considered executable in cygwin causing which
37224   # to not find them
37225   if test "x$new_path" = x \
37226       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37227       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37228     new_path=`$CYGPATH -u "$path"`
37229   fi
37230   if test "x$new_path" = x; then
37231     # Oops. Which didn't find the executable.
37232     # The splitting of arguments from the executable at a space might have been incorrect,
37233     # since paths with space are more likely in Windows. Give it another try with the whole
37234     # argument.
37235     path="$complete"
37236     arguments="EOL"
37237     new_path=`$CYGPATH -u "$path"`
37238     new_path=`$WHICH "$new_path" 2> /dev/null`
37239     # bat and cmd files are not always considered executable in cygwin causing which
37240     # to not find them
37241     if test "x$new_path" = x \
37242         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37243         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37244       new_path=`$CYGPATH -u "$path"`
37245     fi
37246     if test "x$new_path" = x; then
37247       # It's still not found. Now this is an unrecoverable error.
37248       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37249 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37250       has_space=`$ECHO "$complete" | $GREP " "`
37251       if test "x$has_space" != x; then
37252         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37253 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37254       fi
37255       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37256     fi
37257   fi
37258 
37259   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37260   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37261   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37262   # "foo.exe" is OK but "foo" is an error.
37263   #
37264   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37265   # It is also a way to make sure we got the proper file name for the real test later on.
37266   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37267   if test "x$test_shortpath" = x; then
37268     # Short path failed, file does not exist as specified.
37269     # Try adding .exe or .cmd
37270     if test -f "${new_path}.exe"; then
37271       input_to_shortpath="${new_path}.exe"
37272     elif test -f "${new_path}.cmd"; then
37273       input_to_shortpath="${new_path}.cmd"
37274     else
37275       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37276 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37277       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37278 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37279       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37280     fi
37281   else
37282     input_to_shortpath="$new_path"
37283   fi
37284 
37285   # Call helper function which possibly converts this using DOS-style short mode.
37286   # If so, the updated path is stored in $new_path.
37287   new_path="$input_to_shortpath"
37288 
37289   input_path="$input_to_shortpath"
37290   # Check if we need to convert this using DOS-style short mode. If the path
37291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37292   # take no chances and rewrite it.
37293   # Note: m4 eats our [], so we need to use [ and ] instead.
37294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37295   if test "x$has_forbidden_chars" != x; then
37296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37297     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37298     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37299     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37300       # Going to short mode and back again did indeed matter. Since short mode is
37301       # case insensitive, let's make it lowercase to improve readability.
37302       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37303       # Now convert it back to Unix-style (cygpath)
37304       input_path=`$CYGPATH -u "$shortmode_path"`
37305       new_path="$input_path"
37306     fi
37307   fi
37308 
37309   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37310   if test "x$test_cygdrive_prefix" = x; then
37311     # As a simple fix, exclude /usr/bin since it's not a real path.
37312     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37313       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37314       # a path prefixed by /cygdrive for fixpath to work.
37315       new_path="$CYGWIN_ROOT_PATH$input_path"
37316     fi
37317   fi
37318 
37319   # remove trailing .exe if any
37320   new_path="${new_path/%.exe/}"
37321 
37322     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37323 
37324   # First separate the path from the arguments. This will split at the first
37325   # space.
37326   complete="$LD"
37327   path="${complete%% *}"
37328   tmp="$complete EOL"
37329   arguments="${tmp#* }"
37330 
37331   # Input might be given as Windows format, start by converting to
37332   # unix format.
37333   new_path="$path"
37334 
37335   windows_path="$new_path"
37336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37337     unix_path=`$CYGPATH -u "$windows_path"`
37338     new_path="$unix_path"
37339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37341     new_path="$unix_path"
37342   fi
37343 
37344 
37345   # Now try to locate executable using which
37346   new_path=`$WHICH "$new_path" 2> /dev/null`
37347 
37348   if test "x$new_path" = x; then
37349     # Oops. Which didn't find the executable.
37350     # The splitting of arguments from the executable at a space might have been incorrect,
37351     # since paths with space are more likely in Windows. Give it another try with the whole
37352     # argument.
37353     path="$complete"
37354     arguments="EOL"
37355     new_path="$path"
37356 
37357   windows_path="$new_path"
37358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37359     unix_path=`$CYGPATH -u "$windows_path"`
37360     new_path="$unix_path"
37361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37363     new_path="$unix_path"
37364   fi
37365 
37366 
37367     new_path=`$WHICH "$new_path" 2> /dev/null`
37368     # bat and cmd files are not always considered executable in MSYS causing which
37369     # to not find them
37370     if test "x$new_path" = x \
37371         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37372         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37373       new_path="$path"
37374 
37375   windows_path="$new_path"
37376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37377     unix_path=`$CYGPATH -u "$windows_path"`
37378     new_path="$unix_path"
37379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37381     new_path="$unix_path"
37382   fi
37383 
37384     fi
37385 
37386     if test "x$new_path" = x; then
37387       # It's still not found. Now this is an unrecoverable error.
37388       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37389 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37390       has_space=`$ECHO "$complete" | $GREP " "`
37391       if test "x$has_space" != x; then
37392         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37393 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37394       fi
37395       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37396     fi
37397   fi
37398 
37399   # Now new_path has a complete unix path to the binary
37400   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37401     # Keep paths in /bin as-is, but remove trailing .exe if any
37402     new_path="${new_path/%.exe/}"
37403     # Do not save /bin paths to all_fixpath_prefixes!
37404   else
37405     # Not in mixed or Windows style, start by that.
37406     new_path=`cmd //c echo $new_path`
37407 
37408   input_path="$new_path"
37409   # Check if we need to convert this using DOS-style short mode. If the path
37410   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37411   # take no chances and rewrite it.
37412   # Note: m4 eats our [], so we need to use [ and ] instead.
37413   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37414   if test "x$has_forbidden_chars" != x; then
37415     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37416     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37417   fi
37418 
37419     # Output is in $new_path
37420 
37421   windows_path="$new_path"
37422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37423     unix_path=`$CYGPATH -u "$windows_path"`
37424     new_path="$unix_path"
37425   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37426     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37427     new_path="$unix_path"
37428   fi
37429 
37430     # remove trailing .exe if any
37431     new_path="${new_path/%.exe/}"
37432 
37433     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37434     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37435   fi
37436 
37437     else
37438       # We're on a unix platform. Hooray! :)
37439       # First separate the path from the arguments. This will split at the first
37440       # space.
37441       complete="$LD"
37442       path="${complete%% *}"
37443       tmp="$complete EOL"
37444       arguments="${tmp#* }"
37445 
37446       # Cannot rely on the command "which" here since it doesn't always work.
37447       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37448       if test -z "$is_absolute_path"; then
37449         # Path to executable is not absolute. Find it.
37450         IFS_save="$IFS"
37451         IFS=:
37452         for p in $PATH; do
37453           if test -f "$p/$path" && test -x "$p/$path"; then
37454             new_path="$p/$path"
37455             break
37456           fi
37457         done
37458         IFS="$IFS_save"
37459       else
37460         # This is an absolute path, we can use it without further modifications.
37461         new_path="$path"
37462       fi
37463 
37464       if test "x$new_path" = x; then
37465         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37466 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37467         has_space=`$ECHO "$complete" | $GREP " "`
37468         if test "x$has_space" != x; then
37469           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37470 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37471         fi
37472         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37473       fi
37474     fi
37475 
37476     # Now join together the path and the arguments once again
37477     if test "x$arguments" != xEOL; then
37478       new_complete="$new_path ${arguments% *}"
37479     else
37480       new_complete="$new_path"
37481     fi
37482 
37483     if test "x$complete" != "x$new_complete"; then
37484       LD="$new_complete"
37485       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37486 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37487     fi
37488   fi
37489 
37490     # Verify that we indeed succeeded with this trick.
37491     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37492 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37493     "$LD" --version > /dev/null
37494     if test $? -eq 0 ; then
37495       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37496 $as_echo "no" >&6; }
37497       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37498     else
37499       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37500 $as_echo "yes" >&6; }
37501     fi
37502     LDCXX="$LD"
37503   else
37504     # All other toolchains use the compiler to link.
37505     LD="$CC"
37506     LDCXX="$CXX"
37507   fi
37508 
37509   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37510 
37511 
37512   #
37513   # Setup the assembler (AS)
37514   #
37515   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37516 
37517 
37518   # Publish this variable in the help.
37519 
37520 
37521   if [ -z "${AS+x}" ]; then
37522     # The variable is not set by user, try to locate tool using the code snippet
37523     for ac_prog in as
37524 do
37525   # Extract the first word of "$ac_prog", so it can be a program name with args.
37526 set dummy $ac_prog; ac_word=$2
37527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37528 $as_echo_n "checking for $ac_word... " >&6; }
37529 if ${ac_cv_path_AS+:} false; then :
37530   $as_echo_n "(cached) " >&6
37531 else
37532   case $AS in
37533   [\\/]* | ?:[\\/]*)
37534   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37535   ;;
37536   *)
37537   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37538 for as_dir in $PATH
37539 do
37540   IFS=$as_save_IFS
37541   test -z "$as_dir" && as_dir=.
37542     for ac_exec_ext in '' $ac_executable_extensions; do
37543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37544     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37546     break 2
37547   fi
37548 done
37549   done
37550 IFS=$as_save_IFS
37551 
37552   ;;
37553 esac
37554 fi
37555 AS=$ac_cv_path_AS
37556 if test -n "$AS"; then
37557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37558 $as_echo "$AS" >&6; }
37559 else
37560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37561 $as_echo "no" >&6; }
37562 fi
37563 
37564 
37565   test -n "$AS" && break
37566 done
37567 
37568   else
37569     # The variable is set, but is it from the command line or the environment?
37570 
37571     # Try to remove the string !AS! from our list.
37572     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37573     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37574       # If it failed, the variable was not from the command line. Ignore it,
37575       # but warn the user (except for BASH, which is always set by the calling BASH).
37576       if test "xAS" != xBASH; then
37577         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37578 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37579       fi
37580       # Try to locate tool using the code snippet
37581       for ac_prog in as
37582 do
37583   # Extract the first word of "$ac_prog", so it can be a program name with args.
37584 set dummy $ac_prog; ac_word=$2
37585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37586 $as_echo_n "checking for $ac_word... " >&6; }
37587 if ${ac_cv_path_AS+:} false; then :
37588   $as_echo_n "(cached) " >&6
37589 else
37590   case $AS in
37591   [\\/]* | ?:[\\/]*)
37592   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37593   ;;
37594   *)
37595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37596 for as_dir in $PATH
37597 do
37598   IFS=$as_save_IFS
37599   test -z "$as_dir" && as_dir=.
37600     for ac_exec_ext in '' $ac_executable_extensions; do
37601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37602     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37604     break 2
37605   fi
37606 done
37607   done
37608 IFS=$as_save_IFS
37609 
37610   ;;
37611 esac
37612 fi
37613 AS=$ac_cv_path_AS
37614 if test -n "$AS"; then
37615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37616 $as_echo "$AS" >&6; }
37617 else
37618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37619 $as_echo "no" >&6; }
37620 fi
37621 
37622 
37623   test -n "$AS" && break
37624 done
37625 
37626     else
37627       # If it succeeded, then it was overridden by the user. We will use it
37628       # for the tool.
37629 
37630       # First remove it from the list of overridden variables, so we can test
37631       # for unknown variables in the end.
37632       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37633 
37634       # Check if we try to supply an empty value
37635       if test "x$AS" = x; then
37636         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37637 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37638         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37639 $as_echo_n "checking for AS... " >&6; }
37640         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37641 $as_echo "disabled" >&6; }
37642       else
37643         # Check if the provided tool contains a complete path.
37644         tool_specified="$AS"
37645         tool_basename="${tool_specified##*/}"
37646         if test "x$tool_basename" = "x$tool_specified"; then
37647           # A command without a complete path is provided, search $PATH.
37648           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37649 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37650           # Extract the first word of "$tool_basename", so it can be a program name with args.
37651 set dummy $tool_basename; ac_word=$2
37652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37653 $as_echo_n "checking for $ac_word... " >&6; }
37654 if ${ac_cv_path_AS+:} false; then :
37655   $as_echo_n "(cached) " >&6
37656 else
37657   case $AS in
37658   [\\/]* | ?:[\\/]*)
37659   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37660   ;;
37661   *)
37662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37663 for as_dir in $PATH
37664 do
37665   IFS=$as_save_IFS
37666   test -z "$as_dir" && as_dir=.
37667     for ac_exec_ext in '' $ac_executable_extensions; do
37668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37669     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37671     break 2
37672   fi
37673 done
37674   done
37675 IFS=$as_save_IFS
37676 
37677   ;;
37678 esac
37679 fi
37680 AS=$ac_cv_path_AS
37681 if test -n "$AS"; then
37682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37683 $as_echo "$AS" >&6; }
37684 else
37685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37686 $as_echo "no" >&6; }
37687 fi
37688 
37689 
37690           if test "x$AS" = x; then
37691             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37692           fi
37693         else
37694           # Otherwise we believe it is a complete path. Use it as it is.
37695           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37696 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37697           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37698 $as_echo_n "checking for AS... " >&6; }
37699           if test ! -x "$tool_specified"; then
37700             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37701 $as_echo "not found" >&6; }
37702             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37703           fi
37704           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37705 $as_echo "$tool_specified" >&6; }
37706         fi
37707       fi
37708     fi
37709 
37710   fi
37711 
37712 
37713 
37714   # Only process if variable expands to non-empty
37715 
37716   if test "x$AS" != x; then
37717     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37718 
37719   # First separate the path from the arguments. This will split at the first
37720   # space.
37721   complete="$AS"
37722   path="${complete%% *}"
37723   tmp="$complete EOL"
37724   arguments="${tmp#* }"
37725 
37726   # Input might be given as Windows format, start by converting to
37727   # unix format.
37728   new_path=`$CYGPATH -u "$path"`
37729 
37730   # Now try to locate executable using which
37731   new_path=`$WHICH "$new_path" 2> /dev/null`
37732   # bat and cmd files are not always considered executable in cygwin causing which
37733   # to not find them
37734   if test "x$new_path" = x \
37735       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37736       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37737     new_path=`$CYGPATH -u "$path"`
37738   fi
37739   if test "x$new_path" = x; then
37740     # Oops. Which didn't find the executable.
37741     # The splitting of arguments from the executable at a space might have been incorrect,
37742     # since paths with space are more likely in Windows. Give it another try with the whole
37743     # argument.
37744     path="$complete"
37745     arguments="EOL"
37746     new_path=`$CYGPATH -u "$path"`
37747     new_path=`$WHICH "$new_path" 2> /dev/null`
37748     # bat and cmd files are not always considered executable in cygwin causing which
37749     # to not find them
37750     if test "x$new_path" = x \
37751         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37752         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37753       new_path=`$CYGPATH -u "$path"`
37754     fi
37755     if test "x$new_path" = x; then
37756       # It's still not found. Now this is an unrecoverable error.
37757       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37758 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37759       has_space=`$ECHO "$complete" | $GREP " "`
37760       if test "x$has_space" != x; then
37761         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37762 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37763       fi
37764       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37765     fi
37766   fi
37767 
37768   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37769   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37770   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37771   # "foo.exe" is OK but "foo" is an error.
37772   #
37773   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37774   # It is also a way to make sure we got the proper file name for the real test later on.
37775   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37776   if test "x$test_shortpath" = x; then
37777     # Short path failed, file does not exist as specified.
37778     # Try adding .exe or .cmd
37779     if test -f "${new_path}.exe"; then
37780       input_to_shortpath="${new_path}.exe"
37781     elif test -f "${new_path}.cmd"; then
37782       input_to_shortpath="${new_path}.cmd"
37783     else
37784       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37785 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37786       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37787 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37788       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37789     fi
37790   else
37791     input_to_shortpath="$new_path"
37792   fi
37793 
37794   # Call helper function which possibly converts this using DOS-style short mode.
37795   # If so, the updated path is stored in $new_path.
37796   new_path="$input_to_shortpath"
37797 
37798   input_path="$input_to_shortpath"
37799   # Check if we need to convert this using DOS-style short mode. If the path
37800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37801   # take no chances and rewrite it.
37802   # Note: m4 eats our [], so we need to use [ and ] instead.
37803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37804   if test "x$has_forbidden_chars" != x; then
37805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37806     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37807     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37808     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37809       # Going to short mode and back again did indeed matter. Since short mode is
37810       # case insensitive, let's make it lowercase to improve readability.
37811       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37812       # Now convert it back to Unix-style (cygpath)
37813       input_path=`$CYGPATH -u "$shortmode_path"`
37814       new_path="$input_path"
37815     fi
37816   fi
37817 
37818   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37819   if test "x$test_cygdrive_prefix" = x; then
37820     # As a simple fix, exclude /usr/bin since it's not a real path.
37821     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37822       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37823       # a path prefixed by /cygdrive for fixpath to work.
37824       new_path="$CYGWIN_ROOT_PATH$input_path"
37825     fi
37826   fi
37827 
37828   # remove trailing .exe if any
37829   new_path="${new_path/%.exe/}"
37830 
37831     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37832 
37833   # First separate the path from the arguments. This will split at the first
37834   # space.
37835   complete="$AS"
37836   path="${complete%% *}"
37837   tmp="$complete EOL"
37838   arguments="${tmp#* }"
37839 
37840   # Input might be given as Windows format, start by converting to
37841   # unix format.
37842   new_path="$path"
37843 
37844   windows_path="$new_path"
37845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37846     unix_path=`$CYGPATH -u "$windows_path"`
37847     new_path="$unix_path"
37848   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37849     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37850     new_path="$unix_path"
37851   fi
37852 
37853 
37854   # Now try to locate executable using which
37855   new_path=`$WHICH "$new_path" 2> /dev/null`
37856 
37857   if test "x$new_path" = x; then
37858     # Oops. Which didn't find the executable.
37859     # The splitting of arguments from the executable at a space might have been incorrect,
37860     # since paths with space are more likely in Windows. Give it another try with the whole
37861     # argument.
37862     path="$complete"
37863     arguments="EOL"
37864     new_path="$path"
37865 
37866   windows_path="$new_path"
37867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37868     unix_path=`$CYGPATH -u "$windows_path"`
37869     new_path="$unix_path"
37870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37872     new_path="$unix_path"
37873   fi
37874 
37875 
37876     new_path=`$WHICH "$new_path" 2> /dev/null`
37877     # bat and cmd files are not always considered executable in MSYS causing which
37878     # to not find them
37879     if test "x$new_path" = x \
37880         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37881         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37882       new_path="$path"
37883 
37884   windows_path="$new_path"
37885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37886     unix_path=`$CYGPATH -u "$windows_path"`
37887     new_path="$unix_path"
37888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37890     new_path="$unix_path"
37891   fi
37892 
37893     fi
37894 
37895     if test "x$new_path" = x; then
37896       # It's still not found. Now this is an unrecoverable error.
37897       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37898 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37899       has_space=`$ECHO "$complete" | $GREP " "`
37900       if test "x$has_space" != x; then
37901         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37902 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37903       fi
37904       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37905     fi
37906   fi
37907 
37908   # Now new_path has a complete unix path to the binary
37909   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37910     # Keep paths in /bin as-is, but remove trailing .exe if any
37911     new_path="${new_path/%.exe/}"
37912     # Do not save /bin paths to all_fixpath_prefixes!
37913   else
37914     # Not in mixed or Windows style, start by that.
37915     new_path=`cmd //c echo $new_path`
37916 
37917   input_path="$new_path"
37918   # Check if we need to convert this using DOS-style short mode. If the path
37919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37920   # take no chances and rewrite it.
37921   # Note: m4 eats our [], so we need to use [ and ] instead.
37922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37923   if test "x$has_forbidden_chars" != x; then
37924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37926   fi
37927 
37928     # Output is in $new_path
37929 
37930   windows_path="$new_path"
37931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37932     unix_path=`$CYGPATH -u "$windows_path"`
37933     new_path="$unix_path"
37934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37936     new_path="$unix_path"
37937   fi
37938 
37939     # remove trailing .exe if any
37940     new_path="${new_path/%.exe/}"
37941 
37942     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37943     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37944   fi
37945 
37946     else
37947       # We're on a unix platform. Hooray! :)
37948       # First separate the path from the arguments. This will split at the first
37949       # space.
37950       complete="$AS"
37951       path="${complete%% *}"
37952       tmp="$complete EOL"
37953       arguments="${tmp#* }"
37954 
37955       # Cannot rely on the command "which" here since it doesn't always work.
37956       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37957       if test -z "$is_absolute_path"; then
37958         # Path to executable is not absolute. Find it.
37959         IFS_save="$IFS"
37960         IFS=:
37961         for p in $PATH; do
37962           if test -f "$p/$path" && test -x "$p/$path"; then
37963             new_path="$p/$path"
37964             break
37965           fi
37966         done
37967         IFS="$IFS_save"
37968       else
37969         # This is an absolute path, we can use it without further modifications.
37970         new_path="$path"
37971       fi
37972 
37973       if test "x$new_path" = x; then
37974         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37975 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37976         has_space=`$ECHO "$complete" | $GREP " "`
37977         if test "x$has_space" != x; then
37978           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37979 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37980         fi
37981         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37982       fi
37983     fi
37984 
37985     # Now join together the path and the arguments once again
37986     if test "x$arguments" != xEOL; then
37987       new_complete="$new_path ${arguments% *}"
37988     else
37989       new_complete="$new_path"
37990     fi
37991 
37992     if test "x$complete" != "x$new_complete"; then
37993       AS="$new_complete"
37994       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37995 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37996     fi
37997   fi
37998 
37999     if test "x$AS" = x; then
38000       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38001     fi
38002   else
38003     # FIXME: is this correct for microsoft?
38004     AS="$CC -c"
38005   fi
38006 
38007 
38008   #
38009   # Setup the archiver (AR)
38010   #
38011   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38012     # The corresponding ar tool is lib.exe (used to create static libraries)
38013     # Extract the first word of "lib", so it can be a program name with args.
38014 set dummy lib; ac_word=$2
38015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38016 $as_echo_n "checking for $ac_word... " >&6; }
38017 if ${ac_cv_prog_AR+:} false; then :
38018   $as_echo_n "(cached) " >&6
38019 else
38020   if test -n "$AR"; then
38021   ac_cv_prog_AR="$AR" # Let the user override the test.
38022 else
38023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38024 for as_dir in $PATH
38025 do
38026   IFS=$as_save_IFS
38027   test -z "$as_dir" && as_dir=.
38028     for ac_exec_ext in '' $ac_executable_extensions; do
38029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38030     ac_cv_prog_AR="lib"
38031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38032     break 2
38033   fi
38034 done
38035   done
38036 IFS=$as_save_IFS
38037 
38038 fi
38039 fi
38040 AR=$ac_cv_prog_AR
38041 if test -n "$AR"; then
38042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38043 $as_echo "$AR" >&6; }
38044 else
38045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38046 $as_echo "no" >&6; }
38047 fi
38048 
38049 
38050   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38051 
38052 
38053   # Publish this variable in the help.
38054 
38055 
38056   if [ -z "${AR+x}" ]; then
38057     # The variable is not set by user, try to locate tool using the code snippet
38058     if test -n "$ac_tool_prefix"; then
38059   for ac_prog in ar gcc-ar
38060   do
38061     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38062 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38064 $as_echo_n "checking for $ac_word... " >&6; }
38065 if ${ac_cv_prog_AR+:} false; then :
38066   $as_echo_n "(cached) " >&6
38067 else
38068   if test -n "$AR"; then
38069   ac_cv_prog_AR="$AR" # Let the user override the test.
38070 else
38071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38072 for as_dir in $PATH
38073 do
38074   IFS=$as_save_IFS
38075   test -z "$as_dir" && as_dir=.
38076     for ac_exec_ext in '' $ac_executable_extensions; do
38077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38078     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38080     break 2
38081   fi
38082 done
38083   done
38084 IFS=$as_save_IFS
38085 
38086 fi
38087 fi
38088 AR=$ac_cv_prog_AR
38089 if test -n "$AR"; then
38090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38091 $as_echo "$AR" >&6; }
38092 else
38093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38094 $as_echo "no" >&6; }
38095 fi
38096 
38097 
38098     test -n "$AR" && break
38099   done
38100 fi
38101 if test -z "$AR"; then
38102   ac_ct_AR=$AR
38103   for ac_prog in ar gcc-ar
38104 do
38105   # Extract the first word of "$ac_prog", so it can be a program name with args.
38106 set dummy $ac_prog; ac_word=$2
38107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38108 $as_echo_n "checking for $ac_word... " >&6; }
38109 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38110   $as_echo_n "(cached) " >&6
38111 else
38112   if test -n "$ac_ct_AR"; then
38113   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38114 else
38115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38116 for as_dir in $PATH
38117 do
38118   IFS=$as_save_IFS
38119   test -z "$as_dir" && as_dir=.
38120     for ac_exec_ext in '' $ac_executable_extensions; do
38121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38122     ac_cv_prog_ac_ct_AR="$ac_prog"
38123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38124     break 2
38125   fi
38126 done
38127   done
38128 IFS=$as_save_IFS
38129 
38130 fi
38131 fi
38132 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38133 if test -n "$ac_ct_AR"; then
38134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38135 $as_echo "$ac_ct_AR" >&6; }
38136 else
38137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38138 $as_echo "no" >&6; }
38139 fi
38140 
38141 
38142   test -n "$ac_ct_AR" && break
38143 done
38144 
38145   if test "x$ac_ct_AR" = x; then
38146     AR=""
38147   else
38148     case $cross_compiling:$ac_tool_warned in
38149 yes:)
38150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38151 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38152 ac_tool_warned=yes ;;
38153 esac
38154     AR=$ac_ct_AR
38155   fi
38156 fi
38157 
38158   else
38159     # The variable is set, but is it from the command line or the environment?
38160 
38161     # Try to remove the string !AR! from our list.
38162     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38163     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38164       # If it failed, the variable was not from the command line. Ignore it,
38165       # but warn the user (except for BASH, which is always set by the calling BASH).
38166       if test "xAR" != xBASH; then
38167         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38168 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38169       fi
38170       # Try to locate tool using the code snippet
38171       if test -n "$ac_tool_prefix"; then
38172   for ac_prog in ar gcc-ar
38173   do
38174     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38175 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38177 $as_echo_n "checking for $ac_word... " >&6; }
38178 if ${ac_cv_prog_AR+:} false; then :
38179   $as_echo_n "(cached) " >&6
38180 else
38181   if test -n "$AR"; then
38182   ac_cv_prog_AR="$AR" # Let the user override the test.
38183 else
38184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38185 for as_dir in $PATH
38186 do
38187   IFS=$as_save_IFS
38188   test -z "$as_dir" && as_dir=.
38189     for ac_exec_ext in '' $ac_executable_extensions; do
38190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38191     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38193     break 2
38194   fi
38195 done
38196   done
38197 IFS=$as_save_IFS
38198 
38199 fi
38200 fi
38201 AR=$ac_cv_prog_AR
38202 if test -n "$AR"; then
38203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38204 $as_echo "$AR" >&6; }
38205 else
38206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38207 $as_echo "no" >&6; }
38208 fi
38209 
38210 
38211     test -n "$AR" && break
38212   done
38213 fi
38214 if test -z "$AR"; then
38215   ac_ct_AR=$AR
38216   for ac_prog in ar gcc-ar
38217 do
38218   # Extract the first word of "$ac_prog", so it can be a program name with args.
38219 set dummy $ac_prog; ac_word=$2
38220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38221 $as_echo_n "checking for $ac_word... " >&6; }
38222 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38223   $as_echo_n "(cached) " >&6
38224 else
38225   if test -n "$ac_ct_AR"; then
38226   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38227 else
38228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38229 for as_dir in $PATH
38230 do
38231   IFS=$as_save_IFS
38232   test -z "$as_dir" && as_dir=.
38233     for ac_exec_ext in '' $ac_executable_extensions; do
38234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38235     ac_cv_prog_ac_ct_AR="$ac_prog"
38236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38237     break 2
38238   fi
38239 done
38240   done
38241 IFS=$as_save_IFS
38242 
38243 fi
38244 fi
38245 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38246 if test -n "$ac_ct_AR"; then
38247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38248 $as_echo "$ac_ct_AR" >&6; }
38249 else
38250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38251 $as_echo "no" >&6; }
38252 fi
38253 
38254 
38255   test -n "$ac_ct_AR" && break
38256 done
38257 
38258   if test "x$ac_ct_AR" = x; then
38259     AR=""
38260   else
38261     case $cross_compiling:$ac_tool_warned in
38262 yes:)
38263 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38264 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38265 ac_tool_warned=yes ;;
38266 esac
38267     AR=$ac_ct_AR
38268   fi
38269 fi
38270 
38271     else
38272       # If it succeeded, then it was overridden by the user. We will use it
38273       # for the tool.
38274 
38275       # First remove it from the list of overridden variables, so we can test
38276       # for unknown variables in the end.
38277       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38278 
38279       # Check if we try to supply an empty value
38280       if test "x$AR" = x; then
38281         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38282 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38283         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38284 $as_echo_n "checking for AR... " >&6; }
38285         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38286 $as_echo "disabled" >&6; }
38287       else
38288         # Check if the provided tool contains a complete path.
38289         tool_specified="$AR"
38290         tool_basename="${tool_specified##*/}"
38291         if test "x$tool_basename" = "x$tool_specified"; then
38292           # A command without a complete path is provided, search $PATH.
38293           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38294 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38295           # Extract the first word of "$tool_basename", so it can be a program name with args.
38296 set dummy $tool_basename; ac_word=$2
38297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38298 $as_echo_n "checking for $ac_word... " >&6; }
38299 if ${ac_cv_path_AR+:} false; then :
38300   $as_echo_n "(cached) " >&6
38301 else
38302   case $AR in
38303   [\\/]* | ?:[\\/]*)
38304   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38305   ;;
38306   *)
38307   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38308 for as_dir in $PATH
38309 do
38310   IFS=$as_save_IFS
38311   test -z "$as_dir" && as_dir=.
38312     for ac_exec_ext in '' $ac_executable_extensions; do
38313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38314     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38316     break 2
38317   fi
38318 done
38319   done
38320 IFS=$as_save_IFS
38321 
38322   ;;
38323 esac
38324 fi
38325 AR=$ac_cv_path_AR
38326 if test -n "$AR"; then
38327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38328 $as_echo "$AR" >&6; }
38329 else
38330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38331 $as_echo "no" >&6; }
38332 fi
38333 
38334 
38335           if test "x$AR" = x; then
38336             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38337           fi
38338         else
38339           # Otherwise we believe it is a complete path. Use it as it is.
38340           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38341 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38342           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38343 $as_echo_n "checking for AR... " >&6; }
38344           if test ! -x "$tool_specified"; then
38345             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38346 $as_echo "not found" >&6; }
38347             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38348           fi
38349           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38350 $as_echo "$tool_specified" >&6; }
38351         fi
38352       fi
38353     fi
38354 
38355   fi
38356 
38357 
38358   else
38359 
38360 
38361   # Publish this variable in the help.
38362 
38363 
38364   if [ -z "${AR+x}" ]; then
38365     # The variable is not set by user, try to locate tool using the code snippet
38366     if test -n "$ac_tool_prefix"; then
38367   for ac_prog in ar
38368   do
38369     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38370 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38372 $as_echo_n "checking for $ac_word... " >&6; }
38373 if ${ac_cv_prog_AR+:} false; then :
38374   $as_echo_n "(cached) " >&6
38375 else
38376   if test -n "$AR"; then
38377   ac_cv_prog_AR="$AR" # Let the user override the test.
38378 else
38379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38380 for as_dir in $PATH
38381 do
38382   IFS=$as_save_IFS
38383   test -z "$as_dir" && as_dir=.
38384     for ac_exec_ext in '' $ac_executable_extensions; do
38385   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38386     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38388     break 2
38389   fi
38390 done
38391   done
38392 IFS=$as_save_IFS
38393 
38394 fi
38395 fi
38396 AR=$ac_cv_prog_AR
38397 if test -n "$AR"; then
38398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38399 $as_echo "$AR" >&6; }
38400 else
38401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38402 $as_echo "no" >&6; }
38403 fi
38404 
38405 
38406     test -n "$AR" && break
38407   done
38408 fi
38409 if test -z "$AR"; then
38410   ac_ct_AR=$AR
38411   for ac_prog in ar
38412 do
38413   # Extract the first word of "$ac_prog", so it can be a program name with args.
38414 set dummy $ac_prog; ac_word=$2
38415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38416 $as_echo_n "checking for $ac_word... " >&6; }
38417 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38418   $as_echo_n "(cached) " >&6
38419 else
38420   if test -n "$ac_ct_AR"; then
38421   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38422 else
38423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38424 for as_dir in $PATH
38425 do
38426   IFS=$as_save_IFS
38427   test -z "$as_dir" && as_dir=.
38428     for ac_exec_ext in '' $ac_executable_extensions; do
38429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38430     ac_cv_prog_ac_ct_AR="$ac_prog"
38431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38432     break 2
38433   fi
38434 done
38435   done
38436 IFS=$as_save_IFS
38437 
38438 fi
38439 fi
38440 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38441 if test -n "$ac_ct_AR"; then
38442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38443 $as_echo "$ac_ct_AR" >&6; }
38444 else
38445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38446 $as_echo "no" >&6; }
38447 fi
38448 
38449 
38450   test -n "$ac_ct_AR" && break
38451 done
38452 
38453   if test "x$ac_ct_AR" = x; then
38454     AR=""
38455   else
38456     case $cross_compiling:$ac_tool_warned in
38457 yes:)
38458 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38459 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38460 ac_tool_warned=yes ;;
38461 esac
38462     AR=$ac_ct_AR
38463   fi
38464 fi
38465 
38466   else
38467     # The variable is set, but is it from the command line or the environment?
38468 
38469     # Try to remove the string !AR! from our list.
38470     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38471     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38472       # If it failed, the variable was not from the command line. Ignore it,
38473       # but warn the user (except for BASH, which is always set by the calling BASH).
38474       if test "xAR" != xBASH; then
38475         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38476 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38477       fi
38478       # Try to locate tool using the code snippet
38479       if test -n "$ac_tool_prefix"; then
38480   for ac_prog in ar
38481   do
38482     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38483 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38485 $as_echo_n "checking for $ac_word... " >&6; }
38486 if ${ac_cv_prog_AR+:} false; then :
38487   $as_echo_n "(cached) " >&6
38488 else
38489   if test -n "$AR"; then
38490   ac_cv_prog_AR="$AR" # Let the user override the test.
38491 else
38492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38493 for as_dir in $PATH
38494 do
38495   IFS=$as_save_IFS
38496   test -z "$as_dir" && as_dir=.
38497     for ac_exec_ext in '' $ac_executable_extensions; do
38498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38499     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38501     break 2
38502   fi
38503 done
38504   done
38505 IFS=$as_save_IFS
38506 
38507 fi
38508 fi
38509 AR=$ac_cv_prog_AR
38510 if test -n "$AR"; then
38511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38512 $as_echo "$AR" >&6; }
38513 else
38514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38515 $as_echo "no" >&6; }
38516 fi
38517 
38518 
38519     test -n "$AR" && break
38520   done
38521 fi
38522 if test -z "$AR"; then
38523   ac_ct_AR=$AR
38524   for ac_prog in ar
38525 do
38526   # Extract the first word of "$ac_prog", so it can be a program name with args.
38527 set dummy $ac_prog; ac_word=$2
38528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38529 $as_echo_n "checking for $ac_word... " >&6; }
38530 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38531   $as_echo_n "(cached) " >&6
38532 else
38533   if test -n "$ac_ct_AR"; then
38534   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38535 else
38536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38537 for as_dir in $PATH
38538 do
38539   IFS=$as_save_IFS
38540   test -z "$as_dir" && as_dir=.
38541     for ac_exec_ext in '' $ac_executable_extensions; do
38542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38543     ac_cv_prog_ac_ct_AR="$ac_prog"
38544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38545     break 2
38546   fi
38547 done
38548   done
38549 IFS=$as_save_IFS
38550 
38551 fi
38552 fi
38553 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38554 if test -n "$ac_ct_AR"; then
38555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38556 $as_echo "$ac_ct_AR" >&6; }
38557 else
38558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38559 $as_echo "no" >&6; }
38560 fi
38561 
38562 
38563   test -n "$ac_ct_AR" && break
38564 done
38565 
38566   if test "x$ac_ct_AR" = x; then
38567     AR=""
38568   else
38569     case $cross_compiling:$ac_tool_warned in
38570 yes:)
38571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38572 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38573 ac_tool_warned=yes ;;
38574 esac
38575     AR=$ac_ct_AR
38576   fi
38577 fi
38578 
38579     else
38580       # If it succeeded, then it was overridden by the user. We will use it
38581       # for the tool.
38582 
38583       # First remove it from the list of overridden variables, so we can test
38584       # for unknown variables in the end.
38585       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38586 
38587       # Check if we try to supply an empty value
38588       if test "x$AR" = x; then
38589         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38590 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38591         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38592 $as_echo_n "checking for AR... " >&6; }
38593         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38594 $as_echo "disabled" >&6; }
38595       else
38596         # Check if the provided tool contains a complete path.
38597         tool_specified="$AR"
38598         tool_basename="${tool_specified##*/}"
38599         if test "x$tool_basename" = "x$tool_specified"; then
38600           # A command without a complete path is provided, search $PATH.
38601           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38602 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38603           # Extract the first word of "$tool_basename", so it can be a program name with args.
38604 set dummy $tool_basename; ac_word=$2
38605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38606 $as_echo_n "checking for $ac_word... " >&6; }
38607 if ${ac_cv_path_AR+:} false; then :
38608   $as_echo_n "(cached) " >&6
38609 else
38610   case $AR in
38611   [\\/]* | ?:[\\/]*)
38612   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38613   ;;
38614   *)
38615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38616 for as_dir in $PATH
38617 do
38618   IFS=$as_save_IFS
38619   test -z "$as_dir" && as_dir=.
38620     for ac_exec_ext in '' $ac_executable_extensions; do
38621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38622     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38624     break 2
38625   fi
38626 done
38627   done
38628 IFS=$as_save_IFS
38629 
38630   ;;
38631 esac
38632 fi
38633 AR=$ac_cv_path_AR
38634 if test -n "$AR"; then
38635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38636 $as_echo "$AR" >&6; }
38637 else
38638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38639 $as_echo "no" >&6; }
38640 fi
38641 
38642 
38643           if test "x$AR" = x; then
38644             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38645           fi
38646         else
38647           # Otherwise we believe it is a complete path. Use it as it is.
38648           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38649 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38650           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38651 $as_echo_n "checking for AR... " >&6; }
38652           if test ! -x "$tool_specified"; then
38653             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38654 $as_echo "not found" >&6; }
38655             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38656           fi
38657           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38658 $as_echo "$tool_specified" >&6; }
38659         fi
38660       fi
38661     fi
38662 
38663   fi
38664 
38665 
38666   fi
38667 
38668   # Only process if variable expands to non-empty
38669 
38670   if test "x$AR" != x; then
38671     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38672 
38673   # First separate the path from the arguments. This will split at the first
38674   # space.
38675   complete="$AR"
38676   path="${complete%% *}"
38677   tmp="$complete EOL"
38678   arguments="${tmp#* }"
38679 
38680   # Input might be given as Windows format, start by converting to
38681   # unix format.
38682   new_path=`$CYGPATH -u "$path"`
38683 
38684   # Now try to locate executable using which
38685   new_path=`$WHICH "$new_path" 2> /dev/null`
38686   # bat and cmd files are not always considered executable in cygwin causing which
38687   # to not find them
38688   if test "x$new_path" = x \
38689       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38690       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38691     new_path=`$CYGPATH -u "$path"`
38692   fi
38693   if test "x$new_path" = x; then
38694     # Oops. Which didn't find the executable.
38695     # The splitting of arguments from the executable at a space might have been incorrect,
38696     # since paths with space are more likely in Windows. Give it another try with the whole
38697     # argument.
38698     path="$complete"
38699     arguments="EOL"
38700     new_path=`$CYGPATH -u "$path"`
38701     new_path=`$WHICH "$new_path" 2> /dev/null`
38702     # bat and cmd files are not always considered executable in cygwin causing which
38703     # to not find them
38704     if test "x$new_path" = x \
38705         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38706         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38707       new_path=`$CYGPATH -u "$path"`
38708     fi
38709     if test "x$new_path" = x; then
38710       # It's still not found. Now this is an unrecoverable error.
38711       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38712 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38713       has_space=`$ECHO "$complete" | $GREP " "`
38714       if test "x$has_space" != x; then
38715         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38716 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38717       fi
38718       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38719     fi
38720   fi
38721 
38722   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38723   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38724   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38725   # "foo.exe" is OK but "foo" is an error.
38726   #
38727   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38728   # It is also a way to make sure we got the proper file name for the real test later on.
38729   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38730   if test "x$test_shortpath" = x; then
38731     # Short path failed, file does not exist as specified.
38732     # Try adding .exe or .cmd
38733     if test -f "${new_path}.exe"; then
38734       input_to_shortpath="${new_path}.exe"
38735     elif test -f "${new_path}.cmd"; then
38736       input_to_shortpath="${new_path}.cmd"
38737     else
38738       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38739 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38740       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38741 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38742       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38743     fi
38744   else
38745     input_to_shortpath="$new_path"
38746   fi
38747 
38748   # Call helper function which possibly converts this using DOS-style short mode.
38749   # If so, the updated path is stored in $new_path.
38750   new_path="$input_to_shortpath"
38751 
38752   input_path="$input_to_shortpath"
38753   # Check if we need to convert this using DOS-style short mode. If the path
38754   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38755   # take no chances and rewrite it.
38756   # Note: m4 eats our [], so we need to use [ and ] instead.
38757   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38758   if test "x$has_forbidden_chars" != x; then
38759     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38760     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38761     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38762     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38763       # Going to short mode and back again did indeed matter. Since short mode is
38764       # case insensitive, let's make it lowercase to improve readability.
38765       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38766       # Now convert it back to Unix-style (cygpath)
38767       input_path=`$CYGPATH -u "$shortmode_path"`
38768       new_path="$input_path"
38769     fi
38770   fi
38771 
38772   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38773   if test "x$test_cygdrive_prefix" = x; then
38774     # As a simple fix, exclude /usr/bin since it's not a real path.
38775     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38776       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38777       # a path prefixed by /cygdrive for fixpath to work.
38778       new_path="$CYGWIN_ROOT_PATH$input_path"
38779     fi
38780   fi
38781 
38782   # remove trailing .exe if any
38783   new_path="${new_path/%.exe/}"
38784 
38785     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38786 
38787   # First separate the path from the arguments. This will split at the first
38788   # space.
38789   complete="$AR"
38790   path="${complete%% *}"
38791   tmp="$complete EOL"
38792   arguments="${tmp#* }"
38793 
38794   # Input might be given as Windows format, start by converting to
38795   # unix format.
38796   new_path="$path"
38797 
38798   windows_path="$new_path"
38799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38800     unix_path=`$CYGPATH -u "$windows_path"`
38801     new_path="$unix_path"
38802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38804     new_path="$unix_path"
38805   fi
38806 
38807 
38808   # Now try to locate executable using which
38809   new_path=`$WHICH "$new_path" 2> /dev/null`
38810 
38811   if test "x$new_path" = x; then
38812     # Oops. Which didn't find the executable.
38813     # The splitting of arguments from the executable at a space might have been incorrect,
38814     # since paths with space are more likely in Windows. Give it another try with the whole
38815     # argument.
38816     path="$complete"
38817     arguments="EOL"
38818     new_path="$path"
38819 
38820   windows_path="$new_path"
38821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38822     unix_path=`$CYGPATH -u "$windows_path"`
38823     new_path="$unix_path"
38824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38826     new_path="$unix_path"
38827   fi
38828 
38829 
38830     new_path=`$WHICH "$new_path" 2> /dev/null`
38831     # bat and cmd files are not always considered executable in MSYS causing which
38832     # to not find them
38833     if test "x$new_path" = x \
38834         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38835         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38836       new_path="$path"
38837 
38838   windows_path="$new_path"
38839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38840     unix_path=`$CYGPATH -u "$windows_path"`
38841     new_path="$unix_path"
38842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38844     new_path="$unix_path"
38845   fi
38846 
38847     fi
38848 
38849     if test "x$new_path" = x; then
38850       # It's still not found. Now this is an unrecoverable error.
38851       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38852 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38853       has_space=`$ECHO "$complete" | $GREP " "`
38854       if test "x$has_space" != x; then
38855         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38856 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38857       fi
38858       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38859     fi
38860   fi
38861 
38862   # Now new_path has a complete unix path to the binary
38863   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38864     # Keep paths in /bin as-is, but remove trailing .exe if any
38865     new_path="${new_path/%.exe/}"
38866     # Do not save /bin paths to all_fixpath_prefixes!
38867   else
38868     # Not in mixed or Windows style, start by that.
38869     new_path=`cmd //c echo $new_path`
38870 
38871   input_path="$new_path"
38872   # Check if we need to convert this using DOS-style short mode. If the path
38873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38874   # take no chances and rewrite it.
38875   # Note: m4 eats our [], so we need to use [ and ] instead.
38876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38877   if test "x$has_forbidden_chars" != x; then
38878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38879     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38880   fi
38881 
38882     # Output is in $new_path
38883 
38884   windows_path="$new_path"
38885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38886     unix_path=`$CYGPATH -u "$windows_path"`
38887     new_path="$unix_path"
38888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38890     new_path="$unix_path"
38891   fi
38892 
38893     # remove trailing .exe if any
38894     new_path="${new_path/%.exe/}"
38895 
38896     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38897     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38898   fi
38899 
38900     else
38901       # We're on a unix platform. Hooray! :)
38902       # First separate the path from the arguments. This will split at the first
38903       # space.
38904       complete="$AR"
38905       path="${complete%% *}"
38906       tmp="$complete EOL"
38907       arguments="${tmp#* }"
38908 
38909       # Cannot rely on the command "which" here since it doesn't always work.
38910       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38911       if test -z "$is_absolute_path"; then
38912         # Path to executable is not absolute. Find it.
38913         IFS_save="$IFS"
38914         IFS=:
38915         for p in $PATH; do
38916           if test -f "$p/$path" && test -x "$p/$path"; then
38917             new_path="$p/$path"
38918             break
38919           fi
38920         done
38921         IFS="$IFS_save"
38922       else
38923         # This is an absolute path, we can use it without further modifications.
38924         new_path="$path"
38925       fi
38926 
38927       if test "x$new_path" = x; then
38928         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38929 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38930         has_space=`$ECHO "$complete" | $GREP " "`
38931         if test "x$has_space" != x; then
38932           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38933 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38934         fi
38935         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38936       fi
38937     fi
38938 
38939     # Now join together the path and the arguments once again
38940     if test "x$arguments" != xEOL; then
38941       new_complete="$new_path ${arguments% *}"
38942     else
38943       new_complete="$new_path"
38944     fi
38945 
38946     if test "x$complete" != "x$new_complete"; then
38947       AR="$new_complete"
38948       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38949 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38950     fi
38951   fi
38952 
38953 
38954 
38955   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38956 
38957 
38958   # Publish this variable in the help.
38959 
38960 
38961   if [ -z "${LIPO+x}" ]; then
38962     # The variable is not set by user, try to locate tool using the code snippet
38963     for ac_prog in lipo
38964 do
38965   # Extract the first word of "$ac_prog", so it can be a program name with args.
38966 set dummy $ac_prog; ac_word=$2
38967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38968 $as_echo_n "checking for $ac_word... " >&6; }
38969 if ${ac_cv_path_LIPO+:} false; then :
38970   $as_echo_n "(cached) " >&6
38971 else
38972   case $LIPO in
38973   [\\/]* | ?:[\\/]*)
38974   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38975   ;;
38976   *)
38977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38978 for as_dir in $PATH
38979 do
38980   IFS=$as_save_IFS
38981   test -z "$as_dir" && as_dir=.
38982     for ac_exec_ext in '' $ac_executable_extensions; do
38983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38984     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38986     break 2
38987   fi
38988 done
38989   done
38990 IFS=$as_save_IFS
38991 
38992   ;;
38993 esac
38994 fi
38995 LIPO=$ac_cv_path_LIPO
38996 if test -n "$LIPO"; then
38997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38998 $as_echo "$LIPO" >&6; }
38999 else
39000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39001 $as_echo "no" >&6; }
39002 fi
39003 
39004 
39005   test -n "$LIPO" && break
39006 done
39007 
39008   else
39009     # The variable is set, but is it from the command line or the environment?
39010 
39011     # Try to remove the string !LIPO! from our list.
39012     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39013     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39014       # If it failed, the variable was not from the command line. Ignore it,
39015       # but warn the user (except for BASH, which is always set by the calling BASH).
39016       if test "xLIPO" != xBASH; then
39017         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39018 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39019       fi
39020       # Try to locate tool using the code snippet
39021       for ac_prog in lipo
39022 do
39023   # Extract the first word of "$ac_prog", so it can be a program name with args.
39024 set dummy $ac_prog; ac_word=$2
39025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39026 $as_echo_n "checking for $ac_word... " >&6; }
39027 if ${ac_cv_path_LIPO+:} false; then :
39028   $as_echo_n "(cached) " >&6
39029 else
39030   case $LIPO in
39031   [\\/]* | ?:[\\/]*)
39032   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39033   ;;
39034   *)
39035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39036 for as_dir in $PATH
39037 do
39038   IFS=$as_save_IFS
39039   test -z "$as_dir" && as_dir=.
39040     for ac_exec_ext in '' $ac_executable_extensions; do
39041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39042     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39044     break 2
39045   fi
39046 done
39047   done
39048 IFS=$as_save_IFS
39049 
39050   ;;
39051 esac
39052 fi
39053 LIPO=$ac_cv_path_LIPO
39054 if test -n "$LIPO"; then
39055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39056 $as_echo "$LIPO" >&6; }
39057 else
39058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39059 $as_echo "no" >&6; }
39060 fi
39061 
39062 
39063   test -n "$LIPO" && break
39064 done
39065 
39066     else
39067       # If it succeeded, then it was overridden by the user. We will use it
39068       # for the tool.
39069 
39070       # First remove it from the list of overridden variables, so we can test
39071       # for unknown variables in the end.
39072       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39073 
39074       # Check if we try to supply an empty value
39075       if test "x$LIPO" = x; then
39076         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39077 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39079 $as_echo_n "checking for LIPO... " >&6; }
39080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39081 $as_echo "disabled" >&6; }
39082       else
39083         # Check if the provided tool contains a complete path.
39084         tool_specified="$LIPO"
39085         tool_basename="${tool_specified##*/}"
39086         if test "x$tool_basename" = "x$tool_specified"; then
39087           # A command without a complete path is provided, search $PATH.
39088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39089 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39090           # Extract the first word of "$tool_basename", so it can be a program name with args.
39091 set dummy $tool_basename; ac_word=$2
39092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39093 $as_echo_n "checking for $ac_word... " >&6; }
39094 if ${ac_cv_path_LIPO+:} false; then :
39095   $as_echo_n "(cached) " >&6
39096 else
39097   case $LIPO in
39098   [\\/]* | ?:[\\/]*)
39099   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39100   ;;
39101   *)
39102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39103 for as_dir in $PATH
39104 do
39105   IFS=$as_save_IFS
39106   test -z "$as_dir" && as_dir=.
39107     for ac_exec_ext in '' $ac_executable_extensions; do
39108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39109     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39111     break 2
39112   fi
39113 done
39114   done
39115 IFS=$as_save_IFS
39116 
39117   ;;
39118 esac
39119 fi
39120 LIPO=$ac_cv_path_LIPO
39121 if test -n "$LIPO"; then
39122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39123 $as_echo "$LIPO" >&6; }
39124 else
39125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39126 $as_echo "no" >&6; }
39127 fi
39128 
39129 
39130           if test "x$LIPO" = x; then
39131             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39132           fi
39133         else
39134           # Otherwise we believe it is a complete path. Use it as it is.
39135           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39136 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39137           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39138 $as_echo_n "checking for LIPO... " >&6; }
39139           if test ! -x "$tool_specified"; then
39140             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39141 $as_echo "not found" >&6; }
39142             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39143           fi
39144           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39145 $as_echo "$tool_specified" >&6; }
39146         fi
39147       fi
39148     fi
39149 
39150   fi
39151 
39152 
39153 
39154   # Only process if variable expands to non-empty
39155 
39156   if test "x$LIPO" != x; then
39157     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39158 
39159   # First separate the path from the arguments. This will split at the first
39160   # space.
39161   complete="$LIPO"
39162   path="${complete%% *}"
39163   tmp="$complete EOL"
39164   arguments="${tmp#* }"
39165 
39166   # Input might be given as Windows format, start by converting to
39167   # unix format.
39168   new_path=`$CYGPATH -u "$path"`
39169 
39170   # Now try to locate executable using which
39171   new_path=`$WHICH "$new_path" 2> /dev/null`
39172   # bat and cmd files are not always considered executable in cygwin causing which
39173   # to not find them
39174   if test "x$new_path" = x \
39175       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39176       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39177     new_path=`$CYGPATH -u "$path"`
39178   fi
39179   if test "x$new_path" = x; then
39180     # Oops. Which didn't find the executable.
39181     # The splitting of arguments from the executable at a space might have been incorrect,
39182     # since paths with space are more likely in Windows. Give it another try with the whole
39183     # argument.
39184     path="$complete"
39185     arguments="EOL"
39186     new_path=`$CYGPATH -u "$path"`
39187     new_path=`$WHICH "$new_path" 2> /dev/null`
39188     # bat and cmd files are not always considered executable in cygwin causing which
39189     # to not find them
39190     if test "x$new_path" = x \
39191         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39192         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39193       new_path=`$CYGPATH -u "$path"`
39194     fi
39195     if test "x$new_path" = x; then
39196       # It's still not found. Now this is an unrecoverable error.
39197       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39198 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39199       has_space=`$ECHO "$complete" | $GREP " "`
39200       if test "x$has_space" != x; then
39201         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39202 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39203       fi
39204       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39205     fi
39206   fi
39207 
39208   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39209   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39210   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39211   # "foo.exe" is OK but "foo" is an error.
39212   #
39213   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39214   # It is also a way to make sure we got the proper file name for the real test later on.
39215   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39216   if test "x$test_shortpath" = x; then
39217     # Short path failed, file does not exist as specified.
39218     # Try adding .exe or .cmd
39219     if test -f "${new_path}.exe"; then
39220       input_to_shortpath="${new_path}.exe"
39221     elif test -f "${new_path}.cmd"; then
39222       input_to_shortpath="${new_path}.cmd"
39223     else
39224       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39225 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39226       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39227 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39228       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39229     fi
39230   else
39231     input_to_shortpath="$new_path"
39232   fi
39233 
39234   # Call helper function which possibly converts this using DOS-style short mode.
39235   # If so, the updated path is stored in $new_path.
39236   new_path="$input_to_shortpath"
39237 
39238   input_path="$input_to_shortpath"
39239   # Check if we need to convert this using DOS-style short mode. If the path
39240   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39241   # take no chances and rewrite it.
39242   # Note: m4 eats our [], so we need to use [ and ] instead.
39243   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39244   if test "x$has_forbidden_chars" != x; then
39245     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39246     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39247     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39248     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39249       # Going to short mode and back again did indeed matter. Since short mode is
39250       # case insensitive, let's make it lowercase to improve readability.
39251       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39252       # Now convert it back to Unix-style (cygpath)
39253       input_path=`$CYGPATH -u "$shortmode_path"`
39254       new_path="$input_path"
39255     fi
39256   fi
39257 
39258   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39259   if test "x$test_cygdrive_prefix" = x; then
39260     # As a simple fix, exclude /usr/bin since it's not a real path.
39261     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39262       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39263       # a path prefixed by /cygdrive for fixpath to work.
39264       new_path="$CYGWIN_ROOT_PATH$input_path"
39265     fi
39266   fi
39267 
39268   # remove trailing .exe if any
39269   new_path="${new_path/%.exe/}"
39270 
39271     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39272 
39273   # First separate the path from the arguments. This will split at the first
39274   # space.
39275   complete="$LIPO"
39276   path="${complete%% *}"
39277   tmp="$complete EOL"
39278   arguments="${tmp#* }"
39279 
39280   # Input might be given as Windows format, start by converting to
39281   # unix format.
39282   new_path="$path"
39283 
39284   windows_path="$new_path"
39285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39286     unix_path=`$CYGPATH -u "$windows_path"`
39287     new_path="$unix_path"
39288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39290     new_path="$unix_path"
39291   fi
39292 
39293 
39294   # Now try to locate executable using which
39295   new_path=`$WHICH "$new_path" 2> /dev/null`
39296 
39297   if test "x$new_path" = x; then
39298     # Oops. Which didn't find the executable.
39299     # The splitting of arguments from the executable at a space might have been incorrect,
39300     # since paths with space are more likely in Windows. Give it another try with the whole
39301     # argument.
39302     path="$complete"
39303     arguments="EOL"
39304     new_path="$path"
39305 
39306   windows_path="$new_path"
39307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39308     unix_path=`$CYGPATH -u "$windows_path"`
39309     new_path="$unix_path"
39310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39312     new_path="$unix_path"
39313   fi
39314 
39315 
39316     new_path=`$WHICH "$new_path" 2> /dev/null`
39317     # bat and cmd files are not always considered executable in MSYS causing which
39318     # to not find them
39319     if test "x$new_path" = x \
39320         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39321         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39322       new_path="$path"
39323 
39324   windows_path="$new_path"
39325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39326     unix_path=`$CYGPATH -u "$windows_path"`
39327     new_path="$unix_path"
39328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39330     new_path="$unix_path"
39331   fi
39332 
39333     fi
39334 
39335     if test "x$new_path" = x; then
39336       # It's still not found. Now this is an unrecoverable error.
39337       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39338 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39339       has_space=`$ECHO "$complete" | $GREP " "`
39340       if test "x$has_space" != x; then
39341         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39342 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39343       fi
39344       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39345     fi
39346   fi
39347 
39348   # Now new_path has a complete unix path to the binary
39349   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39350     # Keep paths in /bin as-is, but remove trailing .exe if any
39351     new_path="${new_path/%.exe/}"
39352     # Do not save /bin paths to all_fixpath_prefixes!
39353   else
39354     # Not in mixed or Windows style, start by that.
39355     new_path=`cmd //c echo $new_path`
39356 
39357   input_path="$new_path"
39358   # Check if we need to convert this using DOS-style short mode. If the path
39359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39360   # take no chances and rewrite it.
39361   # Note: m4 eats our [], so we need to use [ and ] instead.
39362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39363   if test "x$has_forbidden_chars" != x; then
39364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39365     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39366   fi
39367 
39368     # Output is in $new_path
39369 
39370   windows_path="$new_path"
39371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39372     unix_path=`$CYGPATH -u "$windows_path"`
39373     new_path="$unix_path"
39374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39375     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39376     new_path="$unix_path"
39377   fi
39378 
39379     # remove trailing .exe if any
39380     new_path="${new_path/%.exe/}"
39381 
39382     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39383     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39384   fi
39385 
39386     else
39387       # We're on a unix platform. Hooray! :)
39388       # First separate the path from the arguments. This will split at the first
39389       # space.
39390       complete="$LIPO"
39391       path="${complete%% *}"
39392       tmp="$complete EOL"
39393       arguments="${tmp#* }"
39394 
39395       # Cannot rely on the command "which" here since it doesn't always work.
39396       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39397       if test -z "$is_absolute_path"; then
39398         # Path to executable is not absolute. Find it.
39399         IFS_save="$IFS"
39400         IFS=:
39401         for p in $PATH; do
39402           if test -f "$p/$path" && test -x "$p/$path"; then
39403             new_path="$p/$path"
39404             break
39405           fi
39406         done
39407         IFS="$IFS_save"
39408       else
39409         # This is an absolute path, we can use it without further modifications.
39410         new_path="$path"
39411       fi
39412 
39413       if test "x$new_path" = x; then
39414         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39415 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39416         has_space=`$ECHO "$complete" | $GREP " "`
39417         if test "x$has_space" != x; then
39418           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39419 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39420         fi
39421         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39422       fi
39423     fi
39424 
39425     # Now join together the path and the arguments once again
39426     if test "x$arguments" != xEOL; then
39427       new_complete="$new_path ${arguments% *}"
39428     else
39429       new_complete="$new_path"
39430     fi
39431 
39432     if test "x$complete" != "x$new_complete"; then
39433       LIPO="$new_complete"
39434       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39435 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39436     fi
39437   fi
39438 
39439   fi
39440 
39441   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39442     # Extract the first word of "mt", so it can be a program name with args.
39443 set dummy mt; ac_word=$2
39444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39445 $as_echo_n "checking for $ac_word... " >&6; }
39446 if ${ac_cv_prog_MT+:} false; then :
39447   $as_echo_n "(cached) " >&6
39448 else
39449   if test -n "$MT"; then
39450   ac_cv_prog_MT="$MT" # Let the user override the test.
39451 else
39452   ac_prog_rejected=no
39453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39454 for as_dir in $PATH
39455 do
39456   IFS=$as_save_IFS
39457   test -z "$as_dir" && as_dir=.
39458     for ac_exec_ext in '' $ac_executable_extensions; do
39459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39460     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39461        ac_prog_rejected=yes
39462        continue
39463      fi
39464     ac_cv_prog_MT="mt"
39465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39466     break 2
39467   fi
39468 done
39469   done
39470 IFS=$as_save_IFS
39471 
39472 if test $ac_prog_rejected = yes; then
39473   # We found a bogon in the path, so make sure we never use it.
39474   set dummy $ac_cv_prog_MT
39475   shift
39476   if test $# != 0; then
39477     # We chose a different compiler from the bogus one.
39478     # However, it has the same basename, so the bogon will be chosen
39479     # first if we set MT to just the basename; use the full file name.
39480     shift
39481     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39482   fi
39483 fi
39484 fi
39485 fi
39486 MT=$ac_cv_prog_MT
39487 if test -n "$MT"; then
39488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39489 $as_echo "$MT" >&6; }
39490 else
39491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39492 $as_echo "no" >&6; }
39493 fi
39494 
39495 
39496 
39497   # Only process if variable expands to non-empty
39498 
39499   if test "x$MT" != x; then
39500     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39501 
39502   # First separate the path from the arguments. This will split at the first
39503   # space.
39504   complete="$MT"
39505   path="${complete%% *}"
39506   tmp="$complete EOL"
39507   arguments="${tmp#* }"
39508 
39509   # Input might be given as Windows format, start by converting to
39510   # unix format.
39511   new_path=`$CYGPATH -u "$path"`
39512 
39513   # Now try to locate executable using which
39514   new_path=`$WHICH "$new_path" 2> /dev/null`
39515   # bat and cmd files are not always considered executable in cygwin causing which
39516   # to not find them
39517   if test "x$new_path" = x \
39518       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39519       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39520     new_path=`$CYGPATH -u "$path"`
39521   fi
39522   if test "x$new_path" = x; then
39523     # Oops. Which didn't find the executable.
39524     # The splitting of arguments from the executable at a space might have been incorrect,
39525     # since paths with space are more likely in Windows. Give it another try with the whole
39526     # argument.
39527     path="$complete"
39528     arguments="EOL"
39529     new_path=`$CYGPATH -u "$path"`
39530     new_path=`$WHICH "$new_path" 2> /dev/null`
39531     # bat and cmd files are not always considered executable in cygwin causing which
39532     # to not find them
39533     if test "x$new_path" = x \
39534         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39535         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39536       new_path=`$CYGPATH -u "$path"`
39537     fi
39538     if test "x$new_path" = x; then
39539       # It's still not found. Now this is an unrecoverable error.
39540       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39541 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39542       has_space=`$ECHO "$complete" | $GREP " "`
39543       if test "x$has_space" != x; then
39544         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39545 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39546       fi
39547       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39548     fi
39549   fi
39550 
39551   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39552   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39553   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39554   # "foo.exe" is OK but "foo" is an error.
39555   #
39556   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39557   # It is also a way to make sure we got the proper file name for the real test later on.
39558   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39559   if test "x$test_shortpath" = x; then
39560     # Short path failed, file does not exist as specified.
39561     # Try adding .exe or .cmd
39562     if test -f "${new_path}.exe"; then
39563       input_to_shortpath="${new_path}.exe"
39564     elif test -f "${new_path}.cmd"; then
39565       input_to_shortpath="${new_path}.cmd"
39566     else
39567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39568 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39569       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39570 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39571       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39572     fi
39573   else
39574     input_to_shortpath="$new_path"
39575   fi
39576 
39577   # Call helper function which possibly converts this using DOS-style short mode.
39578   # If so, the updated path is stored in $new_path.
39579   new_path="$input_to_shortpath"
39580 
39581   input_path="$input_to_shortpath"
39582   # Check if we need to convert this using DOS-style short mode. If the path
39583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39584   # take no chances and rewrite it.
39585   # Note: m4 eats our [], so we need to use [ and ] instead.
39586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39587   if test "x$has_forbidden_chars" != x; then
39588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39589     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39590     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39591     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39592       # Going to short mode and back again did indeed matter. Since short mode is
39593       # case insensitive, let's make it lowercase to improve readability.
39594       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39595       # Now convert it back to Unix-style (cygpath)
39596       input_path=`$CYGPATH -u "$shortmode_path"`
39597       new_path="$input_path"
39598     fi
39599   fi
39600 
39601   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39602   if test "x$test_cygdrive_prefix" = x; then
39603     # As a simple fix, exclude /usr/bin since it's not a real path.
39604     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39605       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39606       # a path prefixed by /cygdrive for fixpath to work.
39607       new_path="$CYGWIN_ROOT_PATH$input_path"
39608     fi
39609   fi
39610 
39611   # remove trailing .exe if any
39612   new_path="${new_path/%.exe/}"
39613 
39614     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39615 
39616   # First separate the path from the arguments. This will split at the first
39617   # space.
39618   complete="$MT"
39619   path="${complete%% *}"
39620   tmp="$complete EOL"
39621   arguments="${tmp#* }"
39622 
39623   # Input might be given as Windows format, start by converting to
39624   # unix format.
39625   new_path="$path"
39626 
39627   windows_path="$new_path"
39628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39629     unix_path=`$CYGPATH -u "$windows_path"`
39630     new_path="$unix_path"
39631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39633     new_path="$unix_path"
39634   fi
39635 
39636 
39637   # Now try to locate executable using which
39638   new_path=`$WHICH "$new_path" 2> /dev/null`
39639 
39640   if test "x$new_path" = x; then
39641     # Oops. Which didn't find the executable.
39642     # The splitting of arguments from the executable at a space might have been incorrect,
39643     # since paths with space are more likely in Windows. Give it another try with the whole
39644     # argument.
39645     path="$complete"
39646     arguments="EOL"
39647     new_path="$path"
39648 
39649   windows_path="$new_path"
39650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39651     unix_path=`$CYGPATH -u "$windows_path"`
39652     new_path="$unix_path"
39653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39655     new_path="$unix_path"
39656   fi
39657 
39658 
39659     new_path=`$WHICH "$new_path" 2> /dev/null`
39660     # bat and cmd files are not always considered executable in MSYS causing which
39661     # to not find them
39662     if test "x$new_path" = x \
39663         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39664         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39665       new_path="$path"
39666 
39667   windows_path="$new_path"
39668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39669     unix_path=`$CYGPATH -u "$windows_path"`
39670     new_path="$unix_path"
39671   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39672     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39673     new_path="$unix_path"
39674   fi
39675 
39676     fi
39677 
39678     if test "x$new_path" = x; then
39679       # It's still not found. Now this is an unrecoverable error.
39680       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39681 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39682       has_space=`$ECHO "$complete" | $GREP " "`
39683       if test "x$has_space" != x; then
39684         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39685 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39686       fi
39687       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39688     fi
39689   fi
39690 
39691   # Now new_path has a complete unix path to the binary
39692   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39693     # Keep paths in /bin as-is, but remove trailing .exe if any
39694     new_path="${new_path/%.exe/}"
39695     # Do not save /bin paths to all_fixpath_prefixes!
39696   else
39697     # Not in mixed or Windows style, start by that.
39698     new_path=`cmd //c echo $new_path`
39699 
39700   input_path="$new_path"
39701   # Check if we need to convert this using DOS-style short mode. If the path
39702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39703   # take no chances and rewrite it.
39704   # Note: m4 eats our [], so we need to use [ and ] instead.
39705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39706   if test "x$has_forbidden_chars" != x; then
39707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39708     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39709   fi
39710 
39711     # Output is in $new_path
39712 
39713   windows_path="$new_path"
39714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39715     unix_path=`$CYGPATH -u "$windows_path"`
39716     new_path="$unix_path"
39717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39718     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39719     new_path="$unix_path"
39720   fi
39721 
39722     # remove trailing .exe if any
39723     new_path="${new_path/%.exe/}"
39724 
39725     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39726     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39727   fi
39728 
39729     else
39730       # We're on a unix platform. Hooray! :)
39731       # First separate the path from the arguments. This will split at the first
39732       # space.
39733       complete="$MT"
39734       path="${complete%% *}"
39735       tmp="$complete EOL"
39736       arguments="${tmp#* }"
39737 
39738       # Cannot rely on the command "which" here since it doesn't always work.
39739       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39740       if test -z "$is_absolute_path"; then
39741         # Path to executable is not absolute. Find it.
39742         IFS_save="$IFS"
39743         IFS=:
39744         for p in $PATH; do
39745           if test -f "$p/$path" && test -x "$p/$path"; then
39746             new_path="$p/$path"
39747             break
39748           fi
39749         done
39750         IFS="$IFS_save"
39751       else
39752         # This is an absolute path, we can use it without further modifications.
39753         new_path="$path"
39754       fi
39755 
39756       if test "x$new_path" = x; then
39757         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39758 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39759         has_space=`$ECHO "$complete" | $GREP " "`
39760         if test "x$has_space" != x; then
39761           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39762 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39763         fi
39764         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39765       fi
39766     fi
39767 
39768     # Now join together the path and the arguments once again
39769     if test "x$arguments" != xEOL; then
39770       new_complete="$new_path ${arguments% *}"
39771     else
39772       new_complete="$new_path"
39773     fi
39774 
39775     if test "x$complete" != "x$new_complete"; then
39776       MT="$new_complete"
39777       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39778 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39779     fi
39780   fi
39781 
39782     # Setup the resource compiler (RC)
39783     # Extract the first word of "rc", so it can be a program name with args.
39784 set dummy rc; ac_word=$2
39785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39786 $as_echo_n "checking for $ac_word... " >&6; }
39787 if ${ac_cv_prog_RC+:} false; then :
39788   $as_echo_n "(cached) " >&6
39789 else
39790   if test -n "$RC"; then
39791   ac_cv_prog_RC="$RC" # Let the user override the test.
39792 else
39793   ac_prog_rejected=no
39794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39795 for as_dir in $PATH
39796 do
39797   IFS=$as_save_IFS
39798   test -z "$as_dir" && as_dir=.
39799     for ac_exec_ext in '' $ac_executable_extensions; do
39800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39801     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39802        ac_prog_rejected=yes
39803        continue
39804      fi
39805     ac_cv_prog_RC="rc"
39806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39807     break 2
39808   fi
39809 done
39810   done
39811 IFS=$as_save_IFS
39812 
39813 if test $ac_prog_rejected = yes; then
39814   # We found a bogon in the path, so make sure we never use it.
39815   set dummy $ac_cv_prog_RC
39816   shift
39817   if test $# != 0; then
39818     # We chose a different compiler from the bogus one.
39819     # However, it has the same basename, so the bogon will be chosen
39820     # first if we set RC to just the basename; use the full file name.
39821     shift
39822     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39823   fi
39824 fi
39825 fi
39826 fi
39827 RC=$ac_cv_prog_RC
39828 if test -n "$RC"; then
39829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39830 $as_echo "$RC" >&6; }
39831 else
39832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39833 $as_echo "no" >&6; }
39834 fi
39835 
39836 
39837 
39838   # Only process if variable expands to non-empty
39839 
39840   if test "x$RC" != x; then
39841     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39842 
39843   # First separate the path from the arguments. This will split at the first
39844   # space.
39845   complete="$RC"
39846   path="${complete%% *}"
39847   tmp="$complete EOL"
39848   arguments="${tmp#* }"
39849 
39850   # Input might be given as Windows format, start by converting to
39851   # unix format.
39852   new_path=`$CYGPATH -u "$path"`
39853 
39854   # Now try to locate executable using which
39855   new_path=`$WHICH "$new_path" 2> /dev/null`
39856   # bat and cmd files are not always considered executable in cygwin causing which
39857   # to not find them
39858   if test "x$new_path" = x \
39859       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39860       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39861     new_path=`$CYGPATH -u "$path"`
39862   fi
39863   if test "x$new_path" = x; then
39864     # Oops. Which didn't find the executable.
39865     # The splitting of arguments from the executable at a space might have been incorrect,
39866     # since paths with space are more likely in Windows. Give it another try with the whole
39867     # argument.
39868     path="$complete"
39869     arguments="EOL"
39870     new_path=`$CYGPATH -u "$path"`
39871     new_path=`$WHICH "$new_path" 2> /dev/null`
39872     # bat and cmd files are not always considered executable in cygwin causing which
39873     # to not find them
39874     if test "x$new_path" = x \
39875         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39876         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39877       new_path=`$CYGPATH -u "$path"`
39878     fi
39879     if test "x$new_path" = x; then
39880       # It's still not found. Now this is an unrecoverable error.
39881       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39882 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39883       has_space=`$ECHO "$complete" | $GREP " "`
39884       if test "x$has_space" != x; then
39885         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39886 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39887       fi
39888       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39889     fi
39890   fi
39891 
39892   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39893   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39894   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39895   # "foo.exe" is OK but "foo" is an error.
39896   #
39897   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39898   # It is also a way to make sure we got the proper file name for the real test later on.
39899   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39900   if test "x$test_shortpath" = x; then
39901     # Short path failed, file does not exist as specified.
39902     # Try adding .exe or .cmd
39903     if test -f "${new_path}.exe"; then
39904       input_to_shortpath="${new_path}.exe"
39905     elif test -f "${new_path}.cmd"; then
39906       input_to_shortpath="${new_path}.cmd"
39907     else
39908       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39909 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39910       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39911 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39912       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39913     fi
39914   else
39915     input_to_shortpath="$new_path"
39916   fi
39917 
39918   # Call helper function which possibly converts this using DOS-style short mode.
39919   # If so, the updated path is stored in $new_path.
39920   new_path="$input_to_shortpath"
39921 
39922   input_path="$input_to_shortpath"
39923   # Check if we need to convert this using DOS-style short mode. If the path
39924   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39925   # take no chances and rewrite it.
39926   # Note: m4 eats our [], so we need to use [ and ] instead.
39927   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39928   if test "x$has_forbidden_chars" != x; then
39929     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39930     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39931     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39932     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39933       # Going to short mode and back again did indeed matter. Since short mode is
39934       # case insensitive, let's make it lowercase to improve readability.
39935       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39936       # Now convert it back to Unix-style (cygpath)
39937       input_path=`$CYGPATH -u "$shortmode_path"`
39938       new_path="$input_path"
39939     fi
39940   fi
39941 
39942   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39943   if test "x$test_cygdrive_prefix" = x; then
39944     # As a simple fix, exclude /usr/bin since it's not a real path.
39945     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39946       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39947       # a path prefixed by /cygdrive for fixpath to work.
39948       new_path="$CYGWIN_ROOT_PATH$input_path"
39949     fi
39950   fi
39951 
39952   # remove trailing .exe if any
39953   new_path="${new_path/%.exe/}"
39954 
39955     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39956 
39957   # First separate the path from the arguments. This will split at the first
39958   # space.
39959   complete="$RC"
39960   path="${complete%% *}"
39961   tmp="$complete EOL"
39962   arguments="${tmp#* }"
39963 
39964   # Input might be given as Windows format, start by converting to
39965   # unix format.
39966   new_path="$path"
39967 
39968   windows_path="$new_path"
39969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39970     unix_path=`$CYGPATH -u "$windows_path"`
39971     new_path="$unix_path"
39972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39974     new_path="$unix_path"
39975   fi
39976 
39977 
39978   # Now try to locate executable using which
39979   new_path=`$WHICH "$new_path" 2> /dev/null`
39980 
39981   if test "x$new_path" = x; then
39982     # Oops. Which didn't find the executable.
39983     # The splitting of arguments from the executable at a space might have been incorrect,
39984     # since paths with space are more likely in Windows. Give it another try with the whole
39985     # argument.
39986     path="$complete"
39987     arguments="EOL"
39988     new_path="$path"
39989 
39990   windows_path="$new_path"
39991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39992     unix_path=`$CYGPATH -u "$windows_path"`
39993     new_path="$unix_path"
39994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39995     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39996     new_path="$unix_path"
39997   fi
39998 
39999 
40000     new_path=`$WHICH "$new_path" 2> /dev/null`
40001     # bat and cmd files are not always considered executable in MSYS causing which
40002     # to not find them
40003     if test "x$new_path" = x \
40004         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40005         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40006       new_path="$path"
40007 
40008   windows_path="$new_path"
40009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40010     unix_path=`$CYGPATH -u "$windows_path"`
40011     new_path="$unix_path"
40012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40014     new_path="$unix_path"
40015   fi
40016 
40017     fi
40018 
40019     if test "x$new_path" = x; then
40020       # It's still not found. Now this is an unrecoverable error.
40021       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40022 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40023       has_space=`$ECHO "$complete" | $GREP " "`
40024       if test "x$has_space" != x; then
40025         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40026 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40027       fi
40028       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40029     fi
40030   fi
40031 
40032   # Now new_path has a complete unix path to the binary
40033   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40034     # Keep paths in /bin as-is, but remove trailing .exe if any
40035     new_path="${new_path/%.exe/}"
40036     # Do not save /bin paths to all_fixpath_prefixes!
40037   else
40038     # Not in mixed or Windows style, start by that.
40039     new_path=`cmd //c echo $new_path`
40040 
40041   input_path="$new_path"
40042   # Check if we need to convert this using DOS-style short mode. If the path
40043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40044   # take no chances and rewrite it.
40045   # Note: m4 eats our [], so we need to use [ and ] instead.
40046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40047   if test "x$has_forbidden_chars" != x; then
40048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40049     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40050   fi
40051 
40052     # Output is in $new_path
40053 
40054   windows_path="$new_path"
40055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40056     unix_path=`$CYGPATH -u "$windows_path"`
40057     new_path="$unix_path"
40058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40060     new_path="$unix_path"
40061   fi
40062 
40063     # remove trailing .exe if any
40064     new_path="${new_path/%.exe/}"
40065 
40066     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40067     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40068   fi
40069 
40070     else
40071       # We're on a unix platform. Hooray! :)
40072       # First separate the path from the arguments. This will split at the first
40073       # space.
40074       complete="$RC"
40075       path="${complete%% *}"
40076       tmp="$complete EOL"
40077       arguments="${tmp#* }"
40078 
40079       # Cannot rely on the command "which" here since it doesn't always work.
40080       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40081       if test -z "$is_absolute_path"; then
40082         # Path to executable is not absolute. Find it.
40083         IFS_save="$IFS"
40084         IFS=:
40085         for p in $PATH; do
40086           if test -f "$p/$path" && test -x "$p/$path"; then
40087             new_path="$p/$path"
40088             break
40089           fi
40090         done
40091         IFS="$IFS_save"
40092       else
40093         # This is an absolute path, we can use it without further modifications.
40094         new_path="$path"
40095       fi
40096 
40097       if test "x$new_path" = x; then
40098         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40099 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40100         has_space=`$ECHO "$complete" | $GREP " "`
40101         if test "x$has_space" != x; then
40102           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40103 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40104         fi
40105         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40106       fi
40107     fi
40108 
40109     # Now join together the path and the arguments once again
40110     if test "x$arguments" != xEOL; then
40111       new_complete="$new_path ${arguments% *}"
40112     else
40113       new_complete="$new_path"
40114     fi
40115 
40116     if test "x$complete" != "x$new_complete"; then
40117       RC="$new_complete"
40118       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40119 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40120     fi
40121   fi
40122 
40123     # Extract the first word of "dumpbin", so it can be a program name with args.
40124 set dummy dumpbin; ac_word=$2
40125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40126 $as_echo_n "checking for $ac_word... " >&6; }
40127 if ${ac_cv_prog_DUMPBIN+:} false; then :
40128   $as_echo_n "(cached) " >&6
40129 else
40130   if test -n "$DUMPBIN"; then
40131   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40132 else
40133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40134 for as_dir in $PATH
40135 do
40136   IFS=$as_save_IFS
40137   test -z "$as_dir" && as_dir=.
40138     for ac_exec_ext in '' $ac_executable_extensions; do
40139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40140     ac_cv_prog_DUMPBIN="dumpbin"
40141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40142     break 2
40143   fi
40144 done
40145   done
40146 IFS=$as_save_IFS
40147 
40148 fi
40149 fi
40150 DUMPBIN=$ac_cv_prog_DUMPBIN
40151 if test -n "$DUMPBIN"; then
40152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40153 $as_echo "$DUMPBIN" >&6; }
40154 else
40155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40156 $as_echo "no" >&6; }
40157 fi
40158 
40159 
40160 
40161   # Only process if variable expands to non-empty
40162 
40163   if test "x$DUMPBIN" != x; then
40164     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40165 
40166   # First separate the path from the arguments. This will split at the first
40167   # space.
40168   complete="$DUMPBIN"
40169   path="${complete%% *}"
40170   tmp="$complete EOL"
40171   arguments="${tmp#* }"
40172 
40173   # Input might be given as Windows format, start by converting to
40174   # unix format.
40175   new_path=`$CYGPATH -u "$path"`
40176 
40177   # Now try to locate executable using which
40178   new_path=`$WHICH "$new_path" 2> /dev/null`
40179   # bat and cmd files are not always considered executable in cygwin causing which
40180   # to not find them
40181   if test "x$new_path" = x \
40182       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40183       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40184     new_path=`$CYGPATH -u "$path"`
40185   fi
40186   if test "x$new_path" = x; then
40187     # Oops. Which didn't find the executable.
40188     # The splitting of arguments from the executable at a space might have been incorrect,
40189     # since paths with space are more likely in Windows. Give it another try with the whole
40190     # argument.
40191     path="$complete"
40192     arguments="EOL"
40193     new_path=`$CYGPATH -u "$path"`
40194     new_path=`$WHICH "$new_path" 2> /dev/null`
40195     # bat and cmd files are not always considered executable in cygwin causing which
40196     # to not find them
40197     if test "x$new_path" = x \
40198         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40199         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40200       new_path=`$CYGPATH -u "$path"`
40201     fi
40202     if test "x$new_path" = x; then
40203       # It's still not found. Now this is an unrecoverable error.
40204       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40205 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40206       has_space=`$ECHO "$complete" | $GREP " "`
40207       if test "x$has_space" != x; then
40208         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40209 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40210       fi
40211       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40212     fi
40213   fi
40214 
40215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40218   # "foo.exe" is OK but "foo" is an error.
40219   #
40220   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40221   # It is also a way to make sure we got the proper file name for the real test later on.
40222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40223   if test "x$test_shortpath" = x; then
40224     # Short path failed, file does not exist as specified.
40225     # Try adding .exe or .cmd
40226     if test -f "${new_path}.exe"; then
40227       input_to_shortpath="${new_path}.exe"
40228     elif test -f "${new_path}.cmd"; then
40229       input_to_shortpath="${new_path}.cmd"
40230     else
40231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40232 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40233       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40234 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40235       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40236     fi
40237   else
40238     input_to_shortpath="$new_path"
40239   fi
40240 
40241   # Call helper function which possibly converts this using DOS-style short mode.
40242   # If so, the updated path is stored in $new_path.
40243   new_path="$input_to_shortpath"
40244 
40245   input_path="$input_to_shortpath"
40246   # Check if we need to convert this using DOS-style short mode. If the path
40247   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40248   # take no chances and rewrite it.
40249   # Note: m4 eats our [], so we need to use [ and ] instead.
40250   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40251   if test "x$has_forbidden_chars" != x; then
40252     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40253     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40254     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40255     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40256       # Going to short mode and back again did indeed matter. Since short mode is
40257       # case insensitive, let's make it lowercase to improve readability.
40258       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40259       # Now convert it back to Unix-style (cygpath)
40260       input_path=`$CYGPATH -u "$shortmode_path"`
40261       new_path="$input_path"
40262     fi
40263   fi
40264 
40265   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40266   if test "x$test_cygdrive_prefix" = x; then
40267     # As a simple fix, exclude /usr/bin since it's not a real path.
40268     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40269       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40270       # a path prefixed by /cygdrive for fixpath to work.
40271       new_path="$CYGWIN_ROOT_PATH$input_path"
40272     fi
40273   fi
40274 
40275   # remove trailing .exe if any
40276   new_path="${new_path/%.exe/}"
40277 
40278     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40279 
40280   # First separate the path from the arguments. This will split at the first
40281   # space.
40282   complete="$DUMPBIN"
40283   path="${complete%% *}"
40284   tmp="$complete EOL"
40285   arguments="${tmp#* }"
40286 
40287   # Input might be given as Windows format, start by converting to
40288   # unix format.
40289   new_path="$path"
40290 
40291   windows_path="$new_path"
40292   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40293     unix_path=`$CYGPATH -u "$windows_path"`
40294     new_path="$unix_path"
40295   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40296     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40297     new_path="$unix_path"
40298   fi
40299 
40300 
40301   # Now try to locate executable using which
40302   new_path=`$WHICH "$new_path" 2> /dev/null`
40303 
40304   if test "x$new_path" = x; then
40305     # Oops. Which didn't find the executable.
40306     # The splitting of arguments from the executable at a space might have been incorrect,
40307     # since paths with space are more likely in Windows. Give it another try with the whole
40308     # argument.
40309     path="$complete"
40310     arguments="EOL"
40311     new_path="$path"
40312 
40313   windows_path="$new_path"
40314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40315     unix_path=`$CYGPATH -u "$windows_path"`
40316     new_path="$unix_path"
40317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40319     new_path="$unix_path"
40320   fi
40321 
40322 
40323     new_path=`$WHICH "$new_path" 2> /dev/null`
40324     # bat and cmd files are not always considered executable in MSYS causing which
40325     # to not find them
40326     if test "x$new_path" = x \
40327         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40328         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40329       new_path="$path"
40330 
40331   windows_path="$new_path"
40332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40333     unix_path=`$CYGPATH -u "$windows_path"`
40334     new_path="$unix_path"
40335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40336     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40337     new_path="$unix_path"
40338   fi
40339 
40340     fi
40341 
40342     if test "x$new_path" = x; then
40343       # It's still not found. Now this is an unrecoverable error.
40344       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40345 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40346       has_space=`$ECHO "$complete" | $GREP " "`
40347       if test "x$has_space" != x; then
40348         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40349 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40350       fi
40351       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40352     fi
40353   fi
40354 
40355   # Now new_path has a complete unix path to the binary
40356   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40357     # Keep paths in /bin as-is, but remove trailing .exe if any
40358     new_path="${new_path/%.exe/}"
40359     # Do not save /bin paths to all_fixpath_prefixes!
40360   else
40361     # Not in mixed or Windows style, start by that.
40362     new_path=`cmd //c echo $new_path`
40363 
40364   input_path="$new_path"
40365   # Check if we need to convert this using DOS-style short mode. If the path
40366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40367   # take no chances and rewrite it.
40368   # Note: m4 eats our [], so we need to use [ and ] instead.
40369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40370   if test "x$has_forbidden_chars" != x; then
40371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40372     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40373   fi
40374 
40375     # Output is in $new_path
40376 
40377   windows_path="$new_path"
40378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40379     unix_path=`$CYGPATH -u "$windows_path"`
40380     new_path="$unix_path"
40381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40383     new_path="$unix_path"
40384   fi
40385 
40386     # remove trailing .exe if any
40387     new_path="${new_path/%.exe/}"
40388 
40389     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40390     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40391   fi
40392 
40393     else
40394       # We're on a unix platform. Hooray! :)
40395       # First separate the path from the arguments. This will split at the first
40396       # space.
40397       complete="$DUMPBIN"
40398       path="${complete%% *}"
40399       tmp="$complete EOL"
40400       arguments="${tmp#* }"
40401 
40402       # Cannot rely on the command "which" here since it doesn't always work.
40403       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40404       if test -z "$is_absolute_path"; then
40405         # Path to executable is not absolute. Find it.
40406         IFS_save="$IFS"
40407         IFS=:
40408         for p in $PATH; do
40409           if test -f "$p/$path" && test -x "$p/$path"; then
40410             new_path="$p/$path"
40411             break
40412           fi
40413         done
40414         IFS="$IFS_save"
40415       else
40416         # This is an absolute path, we can use it without further modifications.
40417         new_path="$path"
40418       fi
40419 
40420       if test "x$new_path" = x; then
40421         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40422 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40423         has_space=`$ECHO "$complete" | $GREP " "`
40424         if test "x$has_space" != x; then
40425           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40426 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40427         fi
40428         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40429       fi
40430     fi
40431 
40432     # Now join together the path and the arguments once again
40433     if test "x$arguments" != xEOL; then
40434       new_complete="$new_path ${arguments% *}"
40435     else
40436       new_complete="$new_path"
40437     fi
40438 
40439     if test "x$complete" != "x$new_complete"; then
40440       DUMPBIN="$new_complete"
40441       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40442 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40443     fi
40444   fi
40445 
40446     # We need to check for 'msbuild.exe' because at the place where we expect to
40447     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40448     # won't find the 'msbuild.exe' executable in that case (and the
40449     # 'ac_executable_extensions' is unusable due to performance reasons).
40450     # Notice that we intentionally don't fix up the path to MSBUILD because we
40451     # will call it in a DOS shell during freetype detection on Windows (see
40452     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40453     # Extract the first word of "msbuild.exe", so it can be a program name with args.
40454 set dummy msbuild.exe; ac_word=$2
40455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40456 $as_echo_n "checking for $ac_word... " >&6; }
40457 if ${ac_cv_prog_MSBUILD+:} false; then :
40458   $as_echo_n "(cached) " >&6
40459 else
40460   if test -n "$MSBUILD"; then
40461   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40462 else
40463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40464 for as_dir in $PATH
40465 do
40466   IFS=$as_save_IFS
40467   test -z "$as_dir" && as_dir=.
40468     for ac_exec_ext in '' $ac_executable_extensions; do
40469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40470     ac_cv_prog_MSBUILD="msbuild.exe"
40471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40472     break 2
40473   fi
40474 done
40475   done
40476 IFS=$as_save_IFS
40477 
40478 fi
40479 fi
40480 MSBUILD=$ac_cv_prog_MSBUILD
40481 if test -n "$MSBUILD"; then
40482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40483 $as_echo "$MSBUILD" >&6; }
40484 else
40485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40486 $as_echo "no" >&6; }
40487 fi
40488 
40489 
40490   fi
40491 
40492   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40493 
40494 
40495   # Publish this variable in the help.
40496 
40497 
40498   if [ -z "${STRIP+x}" ]; then
40499     # The variable is not set by user, try to locate tool using the code snippet
40500     for ac_prog in strip
40501 do
40502   # Extract the first word of "$ac_prog", so it can be a program name with args.
40503 set dummy $ac_prog; ac_word=$2
40504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40505 $as_echo_n "checking for $ac_word... " >&6; }
40506 if ${ac_cv_path_STRIP+:} false; then :
40507   $as_echo_n "(cached) " >&6
40508 else
40509   case $STRIP in
40510   [\\/]* | ?:[\\/]*)
40511   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40512   ;;
40513   *)
40514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40515 for as_dir in $PATH
40516 do
40517   IFS=$as_save_IFS
40518   test -z "$as_dir" && as_dir=.
40519     for ac_exec_ext in '' $ac_executable_extensions; do
40520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40521     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40523     break 2
40524   fi
40525 done
40526   done
40527 IFS=$as_save_IFS
40528 
40529   ;;
40530 esac
40531 fi
40532 STRIP=$ac_cv_path_STRIP
40533 if test -n "$STRIP"; then
40534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40535 $as_echo "$STRIP" >&6; }
40536 else
40537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40538 $as_echo "no" >&6; }
40539 fi
40540 
40541 
40542   test -n "$STRIP" && break
40543 done
40544 
40545   else
40546     # The variable is set, but is it from the command line or the environment?
40547 
40548     # Try to remove the string !STRIP! from our list.
40549     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40550     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40551       # If it failed, the variable was not from the command line. Ignore it,
40552       # but warn the user (except for BASH, which is always set by the calling BASH).
40553       if test "xSTRIP" != xBASH; then
40554         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40555 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40556       fi
40557       # Try to locate tool using the code snippet
40558       for ac_prog in strip
40559 do
40560   # Extract the first word of "$ac_prog", so it can be a program name with args.
40561 set dummy $ac_prog; ac_word=$2
40562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40563 $as_echo_n "checking for $ac_word... " >&6; }
40564 if ${ac_cv_path_STRIP+:} false; then :
40565   $as_echo_n "(cached) " >&6
40566 else
40567   case $STRIP in
40568   [\\/]* | ?:[\\/]*)
40569   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40570   ;;
40571   *)
40572   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40573 for as_dir in $PATH
40574 do
40575   IFS=$as_save_IFS
40576   test -z "$as_dir" && as_dir=.
40577     for ac_exec_ext in '' $ac_executable_extensions; do
40578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40579     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40581     break 2
40582   fi
40583 done
40584   done
40585 IFS=$as_save_IFS
40586 
40587   ;;
40588 esac
40589 fi
40590 STRIP=$ac_cv_path_STRIP
40591 if test -n "$STRIP"; then
40592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40593 $as_echo "$STRIP" >&6; }
40594 else
40595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40596 $as_echo "no" >&6; }
40597 fi
40598 
40599 
40600   test -n "$STRIP" && break
40601 done
40602 
40603     else
40604       # If it succeeded, then it was overridden by the user. We will use it
40605       # for the tool.
40606 
40607       # First remove it from the list of overridden variables, so we can test
40608       # for unknown variables in the end.
40609       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40610 
40611       # Check if we try to supply an empty value
40612       if test "x$STRIP" = x; then
40613         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40614 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40615         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40616 $as_echo_n "checking for STRIP... " >&6; }
40617         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40618 $as_echo "disabled" >&6; }
40619       else
40620         # Check if the provided tool contains a complete path.
40621         tool_specified="$STRIP"
40622         tool_basename="${tool_specified##*/}"
40623         if test "x$tool_basename" = "x$tool_specified"; then
40624           # A command without a complete path is provided, search $PATH.
40625           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40626 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40627           # Extract the first word of "$tool_basename", so it can be a program name with args.
40628 set dummy $tool_basename; ac_word=$2
40629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40630 $as_echo_n "checking for $ac_word... " >&6; }
40631 if ${ac_cv_path_STRIP+:} false; then :
40632   $as_echo_n "(cached) " >&6
40633 else
40634   case $STRIP in
40635   [\\/]* | ?:[\\/]*)
40636   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40637   ;;
40638   *)
40639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40640 for as_dir in $PATH
40641 do
40642   IFS=$as_save_IFS
40643   test -z "$as_dir" && as_dir=.
40644     for ac_exec_ext in '' $ac_executable_extensions; do
40645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40646     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40648     break 2
40649   fi
40650 done
40651   done
40652 IFS=$as_save_IFS
40653 
40654   ;;
40655 esac
40656 fi
40657 STRIP=$ac_cv_path_STRIP
40658 if test -n "$STRIP"; then
40659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40660 $as_echo "$STRIP" >&6; }
40661 else
40662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40663 $as_echo "no" >&6; }
40664 fi
40665 
40666 
40667           if test "x$STRIP" = x; then
40668             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40669           fi
40670         else
40671           # Otherwise we believe it is a complete path. Use it as it is.
40672           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40673 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40674           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40675 $as_echo_n "checking for STRIP... " >&6; }
40676           if test ! -x "$tool_specified"; then
40677             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40678 $as_echo "not found" >&6; }
40679             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40680           fi
40681           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40682 $as_echo "$tool_specified" >&6; }
40683         fi
40684       fi
40685     fi
40686 
40687   fi
40688 
40689 
40690 
40691   # Only process if variable expands to non-empty
40692 
40693   if test "x$STRIP" != x; then
40694     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40695 
40696   # First separate the path from the arguments. This will split at the first
40697   # space.
40698   complete="$STRIP"
40699   path="${complete%% *}"
40700   tmp="$complete EOL"
40701   arguments="${tmp#* }"
40702 
40703   # Input might be given as Windows format, start by converting to
40704   # unix format.
40705   new_path=`$CYGPATH -u "$path"`
40706 
40707   # Now try to locate executable using which
40708   new_path=`$WHICH "$new_path" 2> /dev/null`
40709   # bat and cmd files are not always considered executable in cygwin causing which
40710   # to not find them
40711   if test "x$new_path" = x \
40712       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40713       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40714     new_path=`$CYGPATH -u "$path"`
40715   fi
40716   if test "x$new_path" = x; then
40717     # Oops. Which didn't find the executable.
40718     # The splitting of arguments from the executable at a space might have been incorrect,
40719     # since paths with space are more likely in Windows. Give it another try with the whole
40720     # argument.
40721     path="$complete"
40722     arguments="EOL"
40723     new_path=`$CYGPATH -u "$path"`
40724     new_path=`$WHICH "$new_path" 2> /dev/null`
40725     # bat and cmd files are not always considered executable in cygwin causing which
40726     # to not find them
40727     if test "x$new_path" = x \
40728         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40729         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40730       new_path=`$CYGPATH -u "$path"`
40731     fi
40732     if test "x$new_path" = x; then
40733       # It's still not found. Now this is an unrecoverable error.
40734       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40735 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40736       has_space=`$ECHO "$complete" | $GREP " "`
40737       if test "x$has_space" != x; then
40738         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40739 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40740       fi
40741       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40742     fi
40743   fi
40744 
40745   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40746   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40747   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40748   # "foo.exe" is OK but "foo" is an error.
40749   #
40750   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40751   # It is also a way to make sure we got the proper file name for the real test later on.
40752   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40753   if test "x$test_shortpath" = x; then
40754     # Short path failed, file does not exist as specified.
40755     # Try adding .exe or .cmd
40756     if test -f "${new_path}.exe"; then
40757       input_to_shortpath="${new_path}.exe"
40758     elif test -f "${new_path}.cmd"; then
40759       input_to_shortpath="${new_path}.cmd"
40760     else
40761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40762 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40763       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40764 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40765       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40766     fi
40767   else
40768     input_to_shortpath="$new_path"
40769   fi
40770 
40771   # Call helper function which possibly converts this using DOS-style short mode.
40772   # If so, the updated path is stored in $new_path.
40773   new_path="$input_to_shortpath"
40774 
40775   input_path="$input_to_shortpath"
40776   # Check if we need to convert this using DOS-style short mode. If the path
40777   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40778   # take no chances and rewrite it.
40779   # Note: m4 eats our [], so we need to use [ and ] instead.
40780   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40781   if test "x$has_forbidden_chars" != x; then
40782     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40783     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40784     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40785     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40786       # Going to short mode and back again did indeed matter. Since short mode is
40787       # case insensitive, let's make it lowercase to improve readability.
40788       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40789       # Now convert it back to Unix-style (cygpath)
40790       input_path=`$CYGPATH -u "$shortmode_path"`
40791       new_path="$input_path"
40792     fi
40793   fi
40794 
40795   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40796   if test "x$test_cygdrive_prefix" = x; then
40797     # As a simple fix, exclude /usr/bin since it's not a real path.
40798     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40799       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40800       # a path prefixed by /cygdrive for fixpath to work.
40801       new_path="$CYGWIN_ROOT_PATH$input_path"
40802     fi
40803   fi
40804 
40805   # remove trailing .exe if any
40806   new_path="${new_path/%.exe/}"
40807 
40808     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40809 
40810   # First separate the path from the arguments. This will split at the first
40811   # space.
40812   complete="$STRIP"
40813   path="${complete%% *}"
40814   tmp="$complete EOL"
40815   arguments="${tmp#* }"
40816 
40817   # Input might be given as Windows format, start by converting to
40818   # unix format.
40819   new_path="$path"
40820 
40821   windows_path="$new_path"
40822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40823     unix_path=`$CYGPATH -u "$windows_path"`
40824     new_path="$unix_path"
40825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40827     new_path="$unix_path"
40828   fi
40829 
40830 
40831   # Now try to locate executable using which
40832   new_path=`$WHICH "$new_path" 2> /dev/null`
40833 
40834   if test "x$new_path" = x; then
40835     # Oops. Which didn't find the executable.
40836     # The splitting of arguments from the executable at a space might have been incorrect,
40837     # since paths with space are more likely in Windows. Give it another try with the whole
40838     # argument.
40839     path="$complete"
40840     arguments="EOL"
40841     new_path="$path"
40842 
40843   windows_path="$new_path"
40844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40845     unix_path=`$CYGPATH -u "$windows_path"`
40846     new_path="$unix_path"
40847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40848     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40849     new_path="$unix_path"
40850   fi
40851 
40852 
40853     new_path=`$WHICH "$new_path" 2> /dev/null`
40854     # bat and cmd files are not always considered executable in MSYS causing which
40855     # to not find them
40856     if test "x$new_path" = x \
40857         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40858         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40859       new_path="$path"
40860 
40861   windows_path="$new_path"
40862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40863     unix_path=`$CYGPATH -u "$windows_path"`
40864     new_path="$unix_path"
40865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40867     new_path="$unix_path"
40868   fi
40869 
40870     fi
40871 
40872     if test "x$new_path" = x; then
40873       # It's still not found. Now this is an unrecoverable error.
40874       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40875 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40876       has_space=`$ECHO "$complete" | $GREP " "`
40877       if test "x$has_space" != x; then
40878         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40879 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40880       fi
40881       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40882     fi
40883   fi
40884 
40885   # Now new_path has a complete unix path to the binary
40886   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40887     # Keep paths in /bin as-is, but remove trailing .exe if any
40888     new_path="${new_path/%.exe/}"
40889     # Do not save /bin paths to all_fixpath_prefixes!
40890   else
40891     # Not in mixed or Windows style, start by that.
40892     new_path=`cmd //c echo $new_path`
40893 
40894   input_path="$new_path"
40895   # Check if we need to convert this using DOS-style short mode. If the path
40896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40897   # take no chances and rewrite it.
40898   # Note: m4 eats our [], so we need to use [ and ] instead.
40899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40900   if test "x$has_forbidden_chars" != x; then
40901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40902     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40903   fi
40904 
40905     # Output is in $new_path
40906 
40907   windows_path="$new_path"
40908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40909     unix_path=`$CYGPATH -u "$windows_path"`
40910     new_path="$unix_path"
40911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40913     new_path="$unix_path"
40914   fi
40915 
40916     # remove trailing .exe if any
40917     new_path="${new_path/%.exe/}"
40918 
40919     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40920     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40921   fi
40922 
40923     else
40924       # We're on a unix platform. Hooray! :)
40925       # First separate the path from the arguments. This will split at the first
40926       # space.
40927       complete="$STRIP"
40928       path="${complete%% *}"
40929       tmp="$complete EOL"
40930       arguments="${tmp#* }"
40931 
40932       # Cannot rely on the command "which" here since it doesn't always work.
40933       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40934       if test -z "$is_absolute_path"; then
40935         # Path to executable is not absolute. Find it.
40936         IFS_save="$IFS"
40937         IFS=:
40938         for p in $PATH; do
40939           if test -f "$p/$path" && test -x "$p/$path"; then
40940             new_path="$p/$path"
40941             break
40942           fi
40943         done
40944         IFS="$IFS_save"
40945       else
40946         # This is an absolute path, we can use it without further modifications.
40947         new_path="$path"
40948       fi
40949 
40950       if test "x$new_path" = x; then
40951         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40952 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40953         has_space=`$ECHO "$complete" | $GREP " "`
40954         if test "x$has_space" != x; then
40955           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40956 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40957         fi
40958         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40959       fi
40960     fi
40961 
40962     # Now join together the path and the arguments once again
40963     if test "x$arguments" != xEOL; then
40964       new_complete="$new_path ${arguments% *}"
40965     else
40966       new_complete="$new_path"
40967     fi
40968 
40969     if test "x$complete" != "x$new_complete"; then
40970       STRIP="$new_complete"
40971       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40972 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40973     fi
40974   fi
40975 
40976 
40977 
40978   # Publish this variable in the help.
40979 
40980 
40981   if [ -z "${NM+x}" ]; then
40982     # The variable is not set by user, try to locate tool using the code snippet
40983     for ac_prog in nm
40984 do
40985   # Extract the first word of "$ac_prog", so it can be a program name with args.
40986 set dummy $ac_prog; ac_word=$2
40987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40988 $as_echo_n "checking for $ac_word... " >&6; }
40989 if ${ac_cv_path_NM+:} false; then :
40990   $as_echo_n "(cached) " >&6
40991 else
40992   case $NM in
40993   [\\/]* | ?:[\\/]*)
40994   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40995   ;;
40996   *)
40997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40998 for as_dir in $PATH
40999 do
41000   IFS=$as_save_IFS
41001   test -z "$as_dir" && as_dir=.
41002     for ac_exec_ext in '' $ac_executable_extensions; do
41003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41004     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41006     break 2
41007   fi
41008 done
41009   done
41010 IFS=$as_save_IFS
41011 
41012   ;;
41013 esac
41014 fi
41015 NM=$ac_cv_path_NM
41016 if test -n "$NM"; then
41017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41018 $as_echo "$NM" >&6; }
41019 else
41020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41021 $as_echo "no" >&6; }
41022 fi
41023 
41024 
41025   test -n "$NM" && break
41026 done
41027 
41028   else
41029     # The variable is set, but is it from the command line or the environment?
41030 
41031     # Try to remove the string !NM! from our list.
41032     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41033     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41034       # If it failed, the variable was not from the command line. Ignore it,
41035       # but warn the user (except for BASH, which is always set by the calling BASH).
41036       if test "xNM" != xBASH; then
41037         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41038 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41039       fi
41040       # Try to locate tool using the code snippet
41041       for ac_prog in nm
41042 do
41043   # Extract the first word of "$ac_prog", so it can be a program name with args.
41044 set dummy $ac_prog; ac_word=$2
41045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41046 $as_echo_n "checking for $ac_word... " >&6; }
41047 if ${ac_cv_path_NM+:} false; then :
41048   $as_echo_n "(cached) " >&6
41049 else
41050   case $NM in
41051   [\\/]* | ?:[\\/]*)
41052   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41053   ;;
41054   *)
41055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41056 for as_dir in $PATH
41057 do
41058   IFS=$as_save_IFS
41059   test -z "$as_dir" && as_dir=.
41060     for ac_exec_ext in '' $ac_executable_extensions; do
41061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41062     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41064     break 2
41065   fi
41066 done
41067   done
41068 IFS=$as_save_IFS
41069 
41070   ;;
41071 esac
41072 fi
41073 NM=$ac_cv_path_NM
41074 if test -n "$NM"; then
41075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41076 $as_echo "$NM" >&6; }
41077 else
41078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41079 $as_echo "no" >&6; }
41080 fi
41081 
41082 
41083   test -n "$NM" && break
41084 done
41085 
41086     else
41087       # If it succeeded, then it was overridden by the user. We will use it
41088       # for the tool.
41089 
41090       # First remove it from the list of overridden variables, so we can test
41091       # for unknown variables in the end.
41092       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41093 
41094       # Check if we try to supply an empty value
41095       if test "x$NM" = x; then
41096         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41097 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41098         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41099 $as_echo_n "checking for NM... " >&6; }
41100         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41101 $as_echo "disabled" >&6; }
41102       else
41103         # Check if the provided tool contains a complete path.
41104         tool_specified="$NM"
41105         tool_basename="${tool_specified##*/}"
41106         if test "x$tool_basename" = "x$tool_specified"; then
41107           # A command without a complete path is provided, search $PATH.
41108           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41109 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41110           # Extract the first word of "$tool_basename", so it can be a program name with args.
41111 set dummy $tool_basename; ac_word=$2
41112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41113 $as_echo_n "checking for $ac_word... " >&6; }
41114 if ${ac_cv_path_NM+:} false; then :
41115   $as_echo_n "(cached) " >&6
41116 else
41117   case $NM in
41118   [\\/]* | ?:[\\/]*)
41119   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41120   ;;
41121   *)
41122   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41123 for as_dir in $PATH
41124 do
41125   IFS=$as_save_IFS
41126   test -z "$as_dir" && as_dir=.
41127     for ac_exec_ext in '' $ac_executable_extensions; do
41128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41129     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41131     break 2
41132   fi
41133 done
41134   done
41135 IFS=$as_save_IFS
41136 
41137   ;;
41138 esac
41139 fi
41140 NM=$ac_cv_path_NM
41141 if test -n "$NM"; then
41142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41143 $as_echo "$NM" >&6; }
41144 else
41145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41146 $as_echo "no" >&6; }
41147 fi
41148 
41149 
41150           if test "x$NM" = x; then
41151             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41152           fi
41153         else
41154           # Otherwise we believe it is a complete path. Use it as it is.
41155           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41156 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41157           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41158 $as_echo_n "checking for NM... " >&6; }
41159           if test ! -x "$tool_specified"; then
41160             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41161 $as_echo "not found" >&6; }
41162             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41163           fi
41164           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41165 $as_echo "$tool_specified" >&6; }
41166         fi
41167       fi
41168     fi
41169 
41170   fi
41171 
41172 
41173 
41174   # Only process if variable expands to non-empty
41175 
41176   if test "x$NM" != x; then
41177     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41178 
41179   # First separate the path from the arguments. This will split at the first
41180   # space.
41181   complete="$NM"
41182   path="${complete%% *}"
41183   tmp="$complete EOL"
41184   arguments="${tmp#* }"
41185 
41186   # Input might be given as Windows format, start by converting to
41187   # unix format.
41188   new_path=`$CYGPATH -u "$path"`
41189 
41190   # Now try to locate executable using which
41191   new_path=`$WHICH "$new_path" 2> /dev/null`
41192   # bat and cmd files are not always considered executable in cygwin causing which
41193   # to not find them
41194   if test "x$new_path" = x \
41195       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41196       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41197     new_path=`$CYGPATH -u "$path"`
41198   fi
41199   if test "x$new_path" = x; then
41200     # Oops. Which didn't find the executable.
41201     # The splitting of arguments from the executable at a space might have been incorrect,
41202     # since paths with space are more likely in Windows. Give it another try with the whole
41203     # argument.
41204     path="$complete"
41205     arguments="EOL"
41206     new_path=`$CYGPATH -u "$path"`
41207     new_path=`$WHICH "$new_path" 2> /dev/null`
41208     # bat and cmd files are not always considered executable in cygwin causing which
41209     # to not find them
41210     if test "x$new_path" = x \
41211         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41212         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41213       new_path=`$CYGPATH -u "$path"`
41214     fi
41215     if test "x$new_path" = x; then
41216       # It's still not found. Now this is an unrecoverable error.
41217       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41218 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41219       has_space=`$ECHO "$complete" | $GREP " "`
41220       if test "x$has_space" != x; then
41221         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41222 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41223       fi
41224       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41225     fi
41226   fi
41227 
41228   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41229   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41230   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41231   # "foo.exe" is OK but "foo" is an error.
41232   #
41233   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41234   # It is also a way to make sure we got the proper file name for the real test later on.
41235   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41236   if test "x$test_shortpath" = x; then
41237     # Short path failed, file does not exist as specified.
41238     # Try adding .exe or .cmd
41239     if test -f "${new_path}.exe"; then
41240       input_to_shortpath="${new_path}.exe"
41241     elif test -f "${new_path}.cmd"; then
41242       input_to_shortpath="${new_path}.cmd"
41243     else
41244       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41245 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41246       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41247 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41248       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41249     fi
41250   else
41251     input_to_shortpath="$new_path"
41252   fi
41253 
41254   # Call helper function which possibly converts this using DOS-style short mode.
41255   # If so, the updated path is stored in $new_path.
41256   new_path="$input_to_shortpath"
41257 
41258   input_path="$input_to_shortpath"
41259   # Check if we need to convert this using DOS-style short mode. If the path
41260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41261   # take no chances and rewrite it.
41262   # Note: m4 eats our [], so we need to use [ and ] instead.
41263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41264   if test "x$has_forbidden_chars" != x; then
41265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41266     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41267     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41268     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41269       # Going to short mode and back again did indeed matter. Since short mode is
41270       # case insensitive, let's make it lowercase to improve readability.
41271       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41272       # Now convert it back to Unix-style (cygpath)
41273       input_path=`$CYGPATH -u "$shortmode_path"`
41274       new_path="$input_path"
41275     fi
41276   fi
41277 
41278   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41279   if test "x$test_cygdrive_prefix" = x; then
41280     # As a simple fix, exclude /usr/bin since it's not a real path.
41281     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41282       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41283       # a path prefixed by /cygdrive for fixpath to work.
41284       new_path="$CYGWIN_ROOT_PATH$input_path"
41285     fi
41286   fi
41287 
41288   # remove trailing .exe if any
41289   new_path="${new_path/%.exe/}"
41290 
41291     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41292 
41293   # First separate the path from the arguments. This will split at the first
41294   # space.
41295   complete="$NM"
41296   path="${complete%% *}"
41297   tmp="$complete EOL"
41298   arguments="${tmp#* }"
41299 
41300   # Input might be given as Windows format, start by converting to
41301   # unix format.
41302   new_path="$path"
41303 
41304   windows_path="$new_path"
41305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41306     unix_path=`$CYGPATH -u "$windows_path"`
41307     new_path="$unix_path"
41308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41310     new_path="$unix_path"
41311   fi
41312 
41313 
41314   # Now try to locate executable using which
41315   new_path=`$WHICH "$new_path" 2> /dev/null`
41316 
41317   if test "x$new_path" = x; then
41318     # Oops. Which didn't find the executable.
41319     # The splitting of arguments from the executable at a space might have been incorrect,
41320     # since paths with space are more likely in Windows. Give it another try with the whole
41321     # argument.
41322     path="$complete"
41323     arguments="EOL"
41324     new_path="$path"
41325 
41326   windows_path="$new_path"
41327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41328     unix_path=`$CYGPATH -u "$windows_path"`
41329     new_path="$unix_path"
41330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41332     new_path="$unix_path"
41333   fi
41334 
41335 
41336     new_path=`$WHICH "$new_path" 2> /dev/null`
41337     # bat and cmd files are not always considered executable in MSYS causing which
41338     # to not find them
41339     if test "x$new_path" = x \
41340         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41341         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41342       new_path="$path"
41343 
41344   windows_path="$new_path"
41345   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41346     unix_path=`$CYGPATH -u "$windows_path"`
41347     new_path="$unix_path"
41348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41349     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41350     new_path="$unix_path"
41351   fi
41352 
41353     fi
41354 
41355     if test "x$new_path" = x; then
41356       # It's still not found. Now this is an unrecoverable error.
41357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41358 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41359       has_space=`$ECHO "$complete" | $GREP " "`
41360       if test "x$has_space" != x; then
41361         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41362 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41363       fi
41364       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41365     fi
41366   fi
41367 
41368   # Now new_path has a complete unix path to the binary
41369   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41370     # Keep paths in /bin as-is, but remove trailing .exe if any
41371     new_path="${new_path/%.exe/}"
41372     # Do not save /bin paths to all_fixpath_prefixes!
41373   else
41374     # Not in mixed or Windows style, start by that.
41375     new_path=`cmd //c echo $new_path`
41376 
41377   input_path="$new_path"
41378   # Check if we need to convert this using DOS-style short mode. If the path
41379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41380   # take no chances and rewrite it.
41381   # Note: m4 eats our [], so we need to use [ and ] instead.
41382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41383   if test "x$has_forbidden_chars" != x; then
41384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41385     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41386   fi
41387 
41388     # Output is in $new_path
41389 
41390   windows_path="$new_path"
41391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41392     unix_path=`$CYGPATH -u "$windows_path"`
41393     new_path="$unix_path"
41394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41396     new_path="$unix_path"
41397   fi
41398 
41399     # remove trailing .exe if any
41400     new_path="${new_path/%.exe/}"
41401 
41402     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41403     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41404   fi
41405 
41406     else
41407       # We're on a unix platform. Hooray! :)
41408       # First separate the path from the arguments. This will split at the first
41409       # space.
41410       complete="$NM"
41411       path="${complete%% *}"
41412       tmp="$complete EOL"
41413       arguments="${tmp#* }"
41414 
41415       # Cannot rely on the command "which" here since it doesn't always work.
41416       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41417       if test -z "$is_absolute_path"; then
41418         # Path to executable is not absolute. Find it.
41419         IFS_save="$IFS"
41420         IFS=:
41421         for p in $PATH; do
41422           if test -f "$p/$path" && test -x "$p/$path"; then
41423             new_path="$p/$path"
41424             break
41425           fi
41426         done
41427         IFS="$IFS_save"
41428       else
41429         # This is an absolute path, we can use it without further modifications.
41430         new_path="$path"
41431       fi
41432 
41433       if test "x$new_path" = x; then
41434         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41435 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41436         has_space=`$ECHO "$complete" | $GREP " "`
41437         if test "x$has_space" != x; then
41438           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41439 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41440         fi
41441         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41442       fi
41443     fi
41444 
41445     # Now join together the path and the arguments once again
41446     if test "x$arguments" != xEOL; then
41447       new_complete="$new_path ${arguments% *}"
41448     else
41449       new_complete="$new_path"
41450     fi
41451 
41452     if test "x$complete" != "x$new_complete"; then
41453       NM="$new_complete"
41454       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41455 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41456     fi
41457   fi
41458 
41459 
41460 
41461   # Publish this variable in the help.
41462 
41463 
41464   if [ -z "${GNM+x}" ]; then
41465     # The variable is not set by user, try to locate tool using the code snippet
41466     for ac_prog in gnm
41467 do
41468   # Extract the first word of "$ac_prog", so it can be a program name with args.
41469 set dummy $ac_prog; ac_word=$2
41470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41471 $as_echo_n "checking for $ac_word... " >&6; }
41472 if ${ac_cv_path_GNM+:} false; then :
41473   $as_echo_n "(cached) " >&6
41474 else
41475   case $GNM in
41476   [\\/]* | ?:[\\/]*)
41477   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41478   ;;
41479   *)
41480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41481 for as_dir in $PATH
41482 do
41483   IFS=$as_save_IFS
41484   test -z "$as_dir" && as_dir=.
41485     for ac_exec_ext in '' $ac_executable_extensions; do
41486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41487     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41489     break 2
41490   fi
41491 done
41492   done
41493 IFS=$as_save_IFS
41494 
41495   ;;
41496 esac
41497 fi
41498 GNM=$ac_cv_path_GNM
41499 if test -n "$GNM"; then
41500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41501 $as_echo "$GNM" >&6; }
41502 else
41503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41504 $as_echo "no" >&6; }
41505 fi
41506 
41507 
41508   test -n "$GNM" && break
41509 done
41510 
41511   else
41512     # The variable is set, but is it from the command line or the environment?
41513 
41514     # Try to remove the string !GNM! from our list.
41515     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41516     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41517       # If it failed, the variable was not from the command line. Ignore it,
41518       # but warn the user (except for BASH, which is always set by the calling BASH).
41519       if test "xGNM" != xBASH; then
41520         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41521 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41522       fi
41523       # Try to locate tool using the code snippet
41524       for ac_prog in gnm
41525 do
41526   # Extract the first word of "$ac_prog", so it can be a program name with args.
41527 set dummy $ac_prog; ac_word=$2
41528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41529 $as_echo_n "checking for $ac_word... " >&6; }
41530 if ${ac_cv_path_GNM+:} false; then :
41531   $as_echo_n "(cached) " >&6
41532 else
41533   case $GNM in
41534   [\\/]* | ?:[\\/]*)
41535   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41536   ;;
41537   *)
41538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41539 for as_dir in $PATH
41540 do
41541   IFS=$as_save_IFS
41542   test -z "$as_dir" && as_dir=.
41543     for ac_exec_ext in '' $ac_executable_extensions; do
41544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41545     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41547     break 2
41548   fi
41549 done
41550   done
41551 IFS=$as_save_IFS
41552 
41553   ;;
41554 esac
41555 fi
41556 GNM=$ac_cv_path_GNM
41557 if test -n "$GNM"; then
41558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41559 $as_echo "$GNM" >&6; }
41560 else
41561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41562 $as_echo "no" >&6; }
41563 fi
41564 
41565 
41566   test -n "$GNM" && break
41567 done
41568 
41569     else
41570       # If it succeeded, then it was overridden by the user. We will use it
41571       # for the tool.
41572 
41573       # First remove it from the list of overridden variables, so we can test
41574       # for unknown variables in the end.
41575       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41576 
41577       # Check if we try to supply an empty value
41578       if test "x$GNM" = x; then
41579         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41580 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41581         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41582 $as_echo_n "checking for GNM... " >&6; }
41583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41584 $as_echo "disabled" >&6; }
41585       else
41586         # Check if the provided tool contains a complete path.
41587         tool_specified="$GNM"
41588         tool_basename="${tool_specified##*/}"
41589         if test "x$tool_basename" = "x$tool_specified"; then
41590           # A command without a complete path is provided, search $PATH.
41591           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41592 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41593           # Extract the first word of "$tool_basename", so it can be a program name with args.
41594 set dummy $tool_basename; ac_word=$2
41595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41596 $as_echo_n "checking for $ac_word... " >&6; }
41597 if ${ac_cv_path_GNM+:} false; then :
41598   $as_echo_n "(cached) " >&6
41599 else
41600   case $GNM in
41601   [\\/]* | ?:[\\/]*)
41602   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41603   ;;
41604   *)
41605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41606 for as_dir in $PATH
41607 do
41608   IFS=$as_save_IFS
41609   test -z "$as_dir" && as_dir=.
41610     for ac_exec_ext in '' $ac_executable_extensions; do
41611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41612     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41614     break 2
41615   fi
41616 done
41617   done
41618 IFS=$as_save_IFS
41619 
41620   ;;
41621 esac
41622 fi
41623 GNM=$ac_cv_path_GNM
41624 if test -n "$GNM"; then
41625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41626 $as_echo "$GNM" >&6; }
41627 else
41628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41629 $as_echo "no" >&6; }
41630 fi
41631 
41632 
41633           if test "x$GNM" = x; then
41634             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41635           fi
41636         else
41637           # Otherwise we believe it is a complete path. Use it as it is.
41638           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41639 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41640           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41641 $as_echo_n "checking for GNM... " >&6; }
41642           if test ! -x "$tool_specified"; then
41643             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41644 $as_echo "not found" >&6; }
41645             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41646           fi
41647           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41648 $as_echo "$tool_specified" >&6; }
41649         fi
41650       fi
41651     fi
41652 
41653   fi
41654 
41655 
41656 
41657   # Only process if variable expands to non-empty
41658 
41659   if test "x$GNM" != x; then
41660     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41661 
41662   # First separate the path from the arguments. This will split at the first
41663   # space.
41664   complete="$GNM"
41665   path="${complete%% *}"
41666   tmp="$complete EOL"
41667   arguments="${tmp#* }"
41668 
41669   # Input might be given as Windows format, start by converting to
41670   # unix format.
41671   new_path=`$CYGPATH -u "$path"`
41672 
41673   # Now try to locate executable using which
41674   new_path=`$WHICH "$new_path" 2> /dev/null`
41675   # bat and cmd files are not always considered executable in cygwin causing which
41676   # to not find them
41677   if test "x$new_path" = x \
41678       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41679       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41680     new_path=`$CYGPATH -u "$path"`
41681   fi
41682   if test "x$new_path" = x; then
41683     # Oops. Which didn't find the executable.
41684     # The splitting of arguments from the executable at a space might have been incorrect,
41685     # since paths with space are more likely in Windows. Give it another try with the whole
41686     # argument.
41687     path="$complete"
41688     arguments="EOL"
41689     new_path=`$CYGPATH -u "$path"`
41690     new_path=`$WHICH "$new_path" 2> /dev/null`
41691     # bat and cmd files are not always considered executable in cygwin causing which
41692     # to not find them
41693     if test "x$new_path" = x \
41694         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41695         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41696       new_path=`$CYGPATH -u "$path"`
41697     fi
41698     if test "x$new_path" = x; then
41699       # It's still not found. Now this is an unrecoverable error.
41700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41701 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41702       has_space=`$ECHO "$complete" | $GREP " "`
41703       if test "x$has_space" != x; then
41704         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41705 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41706       fi
41707       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41708     fi
41709   fi
41710 
41711   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41712   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41713   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41714   # "foo.exe" is OK but "foo" is an error.
41715   #
41716   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41717   # It is also a way to make sure we got the proper file name for the real test later on.
41718   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41719   if test "x$test_shortpath" = x; then
41720     # Short path failed, file does not exist as specified.
41721     # Try adding .exe or .cmd
41722     if test -f "${new_path}.exe"; then
41723       input_to_shortpath="${new_path}.exe"
41724     elif test -f "${new_path}.cmd"; then
41725       input_to_shortpath="${new_path}.cmd"
41726     else
41727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41728 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41729       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41730 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41731       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41732     fi
41733   else
41734     input_to_shortpath="$new_path"
41735   fi
41736 
41737   # Call helper function which possibly converts this using DOS-style short mode.
41738   # If so, the updated path is stored in $new_path.
41739   new_path="$input_to_shortpath"
41740 
41741   input_path="$input_to_shortpath"
41742   # Check if we need to convert this using DOS-style short mode. If the path
41743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41744   # take no chances and rewrite it.
41745   # Note: m4 eats our [], so we need to use [ and ] instead.
41746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41747   if test "x$has_forbidden_chars" != x; then
41748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41749     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41750     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41751     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41752       # Going to short mode and back again did indeed matter. Since short mode is
41753       # case insensitive, let's make it lowercase to improve readability.
41754       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41755       # Now convert it back to Unix-style (cygpath)
41756       input_path=`$CYGPATH -u "$shortmode_path"`
41757       new_path="$input_path"
41758     fi
41759   fi
41760 
41761   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41762   if test "x$test_cygdrive_prefix" = x; then
41763     # As a simple fix, exclude /usr/bin since it's not a real path.
41764     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41765       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41766       # a path prefixed by /cygdrive for fixpath to work.
41767       new_path="$CYGWIN_ROOT_PATH$input_path"
41768     fi
41769   fi
41770 
41771   # remove trailing .exe if any
41772   new_path="${new_path/%.exe/}"
41773 
41774     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41775 
41776   # First separate the path from the arguments. This will split at the first
41777   # space.
41778   complete="$GNM"
41779   path="${complete%% *}"
41780   tmp="$complete EOL"
41781   arguments="${tmp#* }"
41782 
41783   # Input might be given as Windows format, start by converting to
41784   # unix format.
41785   new_path="$path"
41786 
41787   windows_path="$new_path"
41788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41789     unix_path=`$CYGPATH -u "$windows_path"`
41790     new_path="$unix_path"
41791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41793     new_path="$unix_path"
41794   fi
41795 
41796 
41797   # Now try to locate executable using which
41798   new_path=`$WHICH "$new_path" 2> /dev/null`
41799 
41800   if test "x$new_path" = x; then
41801     # Oops. Which didn't find the executable.
41802     # The splitting of arguments from the executable at a space might have been incorrect,
41803     # since paths with space are more likely in Windows. Give it another try with the whole
41804     # argument.
41805     path="$complete"
41806     arguments="EOL"
41807     new_path="$path"
41808 
41809   windows_path="$new_path"
41810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41811     unix_path=`$CYGPATH -u "$windows_path"`
41812     new_path="$unix_path"
41813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41814     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41815     new_path="$unix_path"
41816   fi
41817 
41818 
41819     new_path=`$WHICH "$new_path" 2> /dev/null`
41820     # bat and cmd files are not always considered executable in MSYS causing which
41821     # to not find them
41822     if test "x$new_path" = x \
41823         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41824         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41825       new_path="$path"
41826 
41827   windows_path="$new_path"
41828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41829     unix_path=`$CYGPATH -u "$windows_path"`
41830     new_path="$unix_path"
41831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41833     new_path="$unix_path"
41834   fi
41835 
41836     fi
41837 
41838     if test "x$new_path" = x; then
41839       # It's still not found. Now this is an unrecoverable error.
41840       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41841 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41842       has_space=`$ECHO "$complete" | $GREP " "`
41843       if test "x$has_space" != x; then
41844         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41845 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41846       fi
41847       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41848     fi
41849   fi
41850 
41851   # Now new_path has a complete unix path to the binary
41852   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41853     # Keep paths in /bin as-is, but remove trailing .exe if any
41854     new_path="${new_path/%.exe/}"
41855     # Do not save /bin paths to all_fixpath_prefixes!
41856   else
41857     # Not in mixed or Windows style, start by that.
41858     new_path=`cmd //c echo $new_path`
41859 
41860   input_path="$new_path"
41861   # Check if we need to convert this using DOS-style short mode. If the path
41862   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41863   # take no chances and rewrite it.
41864   # Note: m4 eats our [], so we need to use [ and ] instead.
41865   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41866   if test "x$has_forbidden_chars" != x; then
41867     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41868     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41869   fi
41870 
41871     # Output is in $new_path
41872 
41873   windows_path="$new_path"
41874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41875     unix_path=`$CYGPATH -u "$windows_path"`
41876     new_path="$unix_path"
41877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41879     new_path="$unix_path"
41880   fi
41881 
41882     # remove trailing .exe if any
41883     new_path="${new_path/%.exe/}"
41884 
41885     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41886     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41887   fi
41888 
41889     else
41890       # We're on a unix platform. Hooray! :)
41891       # First separate the path from the arguments. This will split at the first
41892       # space.
41893       complete="$GNM"
41894       path="${complete%% *}"
41895       tmp="$complete EOL"
41896       arguments="${tmp#* }"
41897 
41898       # Cannot rely on the command "which" here since it doesn't always work.
41899       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41900       if test -z "$is_absolute_path"; then
41901         # Path to executable is not absolute. Find it.
41902         IFS_save="$IFS"
41903         IFS=:
41904         for p in $PATH; do
41905           if test -f "$p/$path" && test -x "$p/$path"; then
41906             new_path="$p/$path"
41907             break
41908           fi
41909         done
41910         IFS="$IFS_save"
41911       else
41912         # This is an absolute path, we can use it without further modifications.
41913         new_path="$path"
41914       fi
41915 
41916       if test "x$new_path" = x; then
41917         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41918 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41919         has_space=`$ECHO "$complete" | $GREP " "`
41920         if test "x$has_space" != x; then
41921           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41922 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41923         fi
41924         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41925       fi
41926     fi
41927 
41928     # Now join together the path and the arguments once again
41929     if test "x$arguments" != xEOL; then
41930       new_complete="$new_path ${arguments% *}"
41931     else
41932       new_complete="$new_path"
41933     fi
41934 
41935     if test "x$complete" != "x$new_complete"; then
41936       GNM="$new_complete"
41937       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41938 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41939     fi
41940   fi
41941 
41942   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41943     # FIXME: we should unify this with the solaris case above.
41944 
41945 
41946   # Publish this variable in the help.
41947 
41948 
41949   if [ -z "${STRIP+x}" ]; then
41950     # The variable is not set by user, try to locate tool using the code snippet
41951     if test -n "$ac_tool_prefix"; then
41952   for ac_prog in strip
41953   do
41954     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41955 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41957 $as_echo_n "checking for $ac_word... " >&6; }
41958 if ${ac_cv_prog_STRIP+:} false; then :
41959   $as_echo_n "(cached) " >&6
41960 else
41961   if test -n "$STRIP"; then
41962   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41963 else
41964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41965 for as_dir in $PATH
41966 do
41967   IFS=$as_save_IFS
41968   test -z "$as_dir" && as_dir=.
41969     for ac_exec_ext in '' $ac_executable_extensions; do
41970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41971     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41973     break 2
41974   fi
41975 done
41976   done
41977 IFS=$as_save_IFS
41978 
41979 fi
41980 fi
41981 STRIP=$ac_cv_prog_STRIP
41982 if test -n "$STRIP"; then
41983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41984 $as_echo "$STRIP" >&6; }
41985 else
41986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41987 $as_echo "no" >&6; }
41988 fi
41989 
41990 
41991     test -n "$STRIP" && break
41992   done
41993 fi
41994 if test -z "$STRIP"; then
41995   ac_ct_STRIP=$STRIP
41996   for ac_prog in strip
41997 do
41998   # Extract the first word of "$ac_prog", so it can be a program name with args.
41999 set dummy $ac_prog; ac_word=$2
42000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42001 $as_echo_n "checking for $ac_word... " >&6; }
42002 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42003   $as_echo_n "(cached) " >&6
42004 else
42005   if test -n "$ac_ct_STRIP"; then
42006   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42007 else
42008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42009 for as_dir in $PATH
42010 do
42011   IFS=$as_save_IFS
42012   test -z "$as_dir" && as_dir=.
42013     for ac_exec_ext in '' $ac_executable_extensions; do
42014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42015     ac_cv_prog_ac_ct_STRIP="$ac_prog"
42016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42017     break 2
42018   fi
42019 done
42020   done
42021 IFS=$as_save_IFS
42022 
42023 fi
42024 fi
42025 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42026 if test -n "$ac_ct_STRIP"; then
42027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42028 $as_echo "$ac_ct_STRIP" >&6; }
42029 else
42030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42031 $as_echo "no" >&6; }
42032 fi
42033 
42034 
42035   test -n "$ac_ct_STRIP" && break
42036 done
42037 
42038   if test "x$ac_ct_STRIP" = x; then
42039     STRIP=""
42040   else
42041     case $cross_compiling:$ac_tool_warned in
42042 yes:)
42043 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42044 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42045 ac_tool_warned=yes ;;
42046 esac
42047     STRIP=$ac_ct_STRIP
42048   fi
42049 fi
42050 
42051   else
42052     # The variable is set, but is it from the command line or the environment?
42053 
42054     # Try to remove the string !STRIP! from our list.
42055     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42056     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42057       # If it failed, the variable was not from the command line. Ignore it,
42058       # but warn the user (except for BASH, which is always set by the calling BASH).
42059       if test "xSTRIP" != xBASH; then
42060         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42061 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42062       fi
42063       # Try to locate tool using the code snippet
42064       if test -n "$ac_tool_prefix"; then
42065   for ac_prog in strip
42066   do
42067     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42068 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42070 $as_echo_n "checking for $ac_word... " >&6; }
42071 if ${ac_cv_prog_STRIP+:} false; then :
42072   $as_echo_n "(cached) " >&6
42073 else
42074   if test -n "$STRIP"; then
42075   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42076 else
42077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42078 for as_dir in $PATH
42079 do
42080   IFS=$as_save_IFS
42081   test -z "$as_dir" && as_dir=.
42082     for ac_exec_ext in '' $ac_executable_extensions; do
42083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42084     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42086     break 2
42087   fi
42088 done
42089   done
42090 IFS=$as_save_IFS
42091 
42092 fi
42093 fi
42094 STRIP=$ac_cv_prog_STRIP
42095 if test -n "$STRIP"; then
42096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42097 $as_echo "$STRIP" >&6; }
42098 else
42099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42100 $as_echo "no" >&6; }
42101 fi
42102 
42103 
42104     test -n "$STRIP" && break
42105   done
42106 fi
42107 if test -z "$STRIP"; then
42108   ac_ct_STRIP=$STRIP
42109   for ac_prog in strip
42110 do
42111   # Extract the first word of "$ac_prog", so it can be a program name with args.
42112 set dummy $ac_prog; ac_word=$2
42113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42114 $as_echo_n "checking for $ac_word... " >&6; }
42115 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42116   $as_echo_n "(cached) " >&6
42117 else
42118   if test -n "$ac_ct_STRIP"; then
42119   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42120 else
42121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42122 for as_dir in $PATH
42123 do
42124   IFS=$as_save_IFS
42125   test -z "$as_dir" && as_dir=.
42126     for ac_exec_ext in '' $ac_executable_extensions; do
42127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42128     ac_cv_prog_ac_ct_STRIP="$ac_prog"
42129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42130     break 2
42131   fi
42132 done
42133   done
42134 IFS=$as_save_IFS
42135 
42136 fi
42137 fi
42138 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42139 if test -n "$ac_ct_STRIP"; then
42140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42141 $as_echo "$ac_ct_STRIP" >&6; }
42142 else
42143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42144 $as_echo "no" >&6; }
42145 fi
42146 
42147 
42148   test -n "$ac_ct_STRIP" && break
42149 done
42150 
42151   if test "x$ac_ct_STRIP" = x; then
42152     STRIP=""
42153   else
42154     case $cross_compiling:$ac_tool_warned in
42155 yes:)
42156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42157 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42158 ac_tool_warned=yes ;;
42159 esac
42160     STRIP=$ac_ct_STRIP
42161   fi
42162 fi
42163 
42164     else
42165       # If it succeeded, then it was overridden by the user. We will use it
42166       # for the tool.
42167 
42168       # First remove it from the list of overridden variables, so we can test
42169       # for unknown variables in the end.
42170       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42171 
42172       # Check if we try to supply an empty value
42173       if test "x$STRIP" = x; then
42174         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42175 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42176         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42177 $as_echo_n "checking for STRIP... " >&6; }
42178         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42179 $as_echo "disabled" >&6; }
42180       else
42181         # Check if the provided tool contains a complete path.
42182         tool_specified="$STRIP"
42183         tool_basename="${tool_specified##*/}"
42184         if test "x$tool_basename" = "x$tool_specified"; then
42185           # A command without a complete path is provided, search $PATH.
42186           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42187 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42188           # Extract the first word of "$tool_basename", so it can be a program name with args.
42189 set dummy $tool_basename; ac_word=$2
42190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42191 $as_echo_n "checking for $ac_word... " >&6; }
42192 if ${ac_cv_path_STRIP+:} false; then :
42193   $as_echo_n "(cached) " >&6
42194 else
42195   case $STRIP in
42196   [\\/]* | ?:[\\/]*)
42197   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42198   ;;
42199   *)
42200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42201 for as_dir in $PATH
42202 do
42203   IFS=$as_save_IFS
42204   test -z "$as_dir" && as_dir=.
42205     for ac_exec_ext in '' $ac_executable_extensions; do
42206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42207     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42209     break 2
42210   fi
42211 done
42212   done
42213 IFS=$as_save_IFS
42214 
42215   ;;
42216 esac
42217 fi
42218 STRIP=$ac_cv_path_STRIP
42219 if test -n "$STRIP"; then
42220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42221 $as_echo "$STRIP" >&6; }
42222 else
42223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42224 $as_echo "no" >&6; }
42225 fi
42226 
42227 
42228           if test "x$STRIP" = x; then
42229             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42230           fi
42231         else
42232           # Otherwise we believe it is a complete path. Use it as it is.
42233           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42234 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42235           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42236 $as_echo_n "checking for STRIP... " >&6; }
42237           if test ! -x "$tool_specified"; then
42238             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42239 $as_echo "not found" >&6; }
42240             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42241           fi
42242           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42243 $as_echo "$tool_specified" >&6; }
42244         fi
42245       fi
42246     fi
42247 
42248   fi
42249 
42250 
42251 
42252   # Only process if variable expands to non-empty
42253 
42254   if test "x$STRIP" != x; then
42255     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42256 
42257   # First separate the path from the arguments. This will split at the first
42258   # space.
42259   complete="$STRIP"
42260   path="${complete%% *}"
42261   tmp="$complete EOL"
42262   arguments="${tmp#* }"
42263 
42264   # Input might be given as Windows format, start by converting to
42265   # unix format.
42266   new_path=`$CYGPATH -u "$path"`
42267 
42268   # Now try to locate executable using which
42269   new_path=`$WHICH "$new_path" 2> /dev/null`
42270   # bat and cmd files are not always considered executable in cygwin causing which
42271   # to not find them
42272   if test "x$new_path" = x \
42273       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42274       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42275     new_path=`$CYGPATH -u "$path"`
42276   fi
42277   if test "x$new_path" = x; then
42278     # Oops. Which didn't find the executable.
42279     # The splitting of arguments from the executable at a space might have been incorrect,
42280     # since paths with space are more likely in Windows. Give it another try with the whole
42281     # argument.
42282     path="$complete"
42283     arguments="EOL"
42284     new_path=`$CYGPATH -u "$path"`
42285     new_path=`$WHICH "$new_path" 2> /dev/null`
42286     # bat and cmd files are not always considered executable in cygwin causing which
42287     # to not find them
42288     if test "x$new_path" = x \
42289         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42290         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42291       new_path=`$CYGPATH -u "$path"`
42292     fi
42293     if test "x$new_path" = x; then
42294       # It's still not found. Now this is an unrecoverable error.
42295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42296 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42297       has_space=`$ECHO "$complete" | $GREP " "`
42298       if test "x$has_space" != x; then
42299         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42300 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42301       fi
42302       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42303     fi
42304   fi
42305 
42306   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42307   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42308   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42309   # "foo.exe" is OK but "foo" is an error.
42310   #
42311   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42312   # It is also a way to make sure we got the proper file name for the real test later on.
42313   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42314   if test "x$test_shortpath" = x; then
42315     # Short path failed, file does not exist as specified.
42316     # Try adding .exe or .cmd
42317     if test -f "${new_path}.exe"; then
42318       input_to_shortpath="${new_path}.exe"
42319     elif test -f "${new_path}.cmd"; then
42320       input_to_shortpath="${new_path}.cmd"
42321     else
42322       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42323 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42324       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42325 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42326       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42327     fi
42328   else
42329     input_to_shortpath="$new_path"
42330   fi
42331 
42332   # Call helper function which possibly converts this using DOS-style short mode.
42333   # If so, the updated path is stored in $new_path.
42334   new_path="$input_to_shortpath"
42335 
42336   input_path="$input_to_shortpath"
42337   # Check if we need to convert this using DOS-style short mode. If the path
42338   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42339   # take no chances and rewrite it.
42340   # Note: m4 eats our [], so we need to use [ and ] instead.
42341   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42342   if test "x$has_forbidden_chars" != x; then
42343     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42344     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42345     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42346     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42347       # Going to short mode and back again did indeed matter. Since short mode is
42348       # case insensitive, let's make it lowercase to improve readability.
42349       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42350       # Now convert it back to Unix-style (cygpath)
42351       input_path=`$CYGPATH -u "$shortmode_path"`
42352       new_path="$input_path"
42353     fi
42354   fi
42355 
42356   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42357   if test "x$test_cygdrive_prefix" = x; then
42358     # As a simple fix, exclude /usr/bin since it's not a real path.
42359     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42360       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42361       # a path prefixed by /cygdrive for fixpath to work.
42362       new_path="$CYGWIN_ROOT_PATH$input_path"
42363     fi
42364   fi
42365 
42366   # remove trailing .exe if any
42367   new_path="${new_path/%.exe/}"
42368 
42369     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42370 
42371   # First separate the path from the arguments. This will split at the first
42372   # space.
42373   complete="$STRIP"
42374   path="${complete%% *}"
42375   tmp="$complete EOL"
42376   arguments="${tmp#* }"
42377 
42378   # Input might be given as Windows format, start by converting to
42379   # unix format.
42380   new_path="$path"
42381 
42382   windows_path="$new_path"
42383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42384     unix_path=`$CYGPATH -u "$windows_path"`
42385     new_path="$unix_path"
42386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42388     new_path="$unix_path"
42389   fi
42390 
42391 
42392   # Now try to locate executable using which
42393   new_path=`$WHICH "$new_path" 2> /dev/null`
42394 
42395   if test "x$new_path" = x; then
42396     # Oops. Which didn't find the executable.
42397     # The splitting of arguments from the executable at a space might have been incorrect,
42398     # since paths with space are more likely in Windows. Give it another try with the whole
42399     # argument.
42400     path="$complete"
42401     arguments="EOL"
42402     new_path="$path"
42403 
42404   windows_path="$new_path"
42405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42406     unix_path=`$CYGPATH -u "$windows_path"`
42407     new_path="$unix_path"
42408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42409     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42410     new_path="$unix_path"
42411   fi
42412 
42413 
42414     new_path=`$WHICH "$new_path" 2> /dev/null`
42415     # bat and cmd files are not always considered executable in MSYS causing which
42416     # to not find them
42417     if test "x$new_path" = x \
42418         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42419         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42420       new_path="$path"
42421 
42422   windows_path="$new_path"
42423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42424     unix_path=`$CYGPATH -u "$windows_path"`
42425     new_path="$unix_path"
42426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42428     new_path="$unix_path"
42429   fi
42430 
42431     fi
42432 
42433     if test "x$new_path" = x; then
42434       # It's still not found. Now this is an unrecoverable error.
42435       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42436 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42437       has_space=`$ECHO "$complete" | $GREP " "`
42438       if test "x$has_space" != x; then
42439         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42440 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42441       fi
42442       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42443     fi
42444   fi
42445 
42446   # Now new_path has a complete unix path to the binary
42447   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42448     # Keep paths in /bin as-is, but remove trailing .exe if any
42449     new_path="${new_path/%.exe/}"
42450     # Do not save /bin paths to all_fixpath_prefixes!
42451   else
42452     # Not in mixed or Windows style, start by that.
42453     new_path=`cmd //c echo $new_path`
42454 
42455   input_path="$new_path"
42456   # Check if we need to convert this using DOS-style short mode. If the path
42457   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42458   # take no chances and rewrite it.
42459   # Note: m4 eats our [], so we need to use [ and ] instead.
42460   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42461   if test "x$has_forbidden_chars" != x; then
42462     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42463     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42464   fi
42465 
42466     # Output is in $new_path
42467 
42468   windows_path="$new_path"
42469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42470     unix_path=`$CYGPATH -u "$windows_path"`
42471     new_path="$unix_path"
42472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42473     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42474     new_path="$unix_path"
42475   fi
42476 
42477     # remove trailing .exe if any
42478     new_path="${new_path/%.exe/}"
42479 
42480     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42481     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42482   fi
42483 
42484     else
42485       # We're on a unix platform. Hooray! :)
42486       # First separate the path from the arguments. This will split at the first
42487       # space.
42488       complete="$STRIP"
42489       path="${complete%% *}"
42490       tmp="$complete EOL"
42491       arguments="${tmp#* }"
42492 
42493       # Cannot rely on the command "which" here since it doesn't always work.
42494       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42495       if test -z "$is_absolute_path"; then
42496         # Path to executable is not absolute. Find it.
42497         IFS_save="$IFS"
42498         IFS=:
42499         for p in $PATH; do
42500           if test -f "$p/$path" && test -x "$p/$path"; then
42501             new_path="$p/$path"
42502             break
42503           fi
42504         done
42505         IFS="$IFS_save"
42506       else
42507         # This is an absolute path, we can use it without further modifications.
42508         new_path="$path"
42509       fi
42510 
42511       if test "x$new_path" = x; then
42512         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42513 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42514         has_space=`$ECHO "$complete" | $GREP " "`
42515         if test "x$has_space" != x; then
42516           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42517 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42518         fi
42519         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42520       fi
42521     fi
42522 
42523     # Now join together the path and the arguments once again
42524     if test "x$arguments" != xEOL; then
42525       new_complete="$new_path ${arguments% *}"
42526     else
42527       new_complete="$new_path"
42528     fi
42529 
42530     if test "x$complete" != "x$new_complete"; then
42531       STRIP="$new_complete"
42532       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42533 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42534     fi
42535   fi
42536 
42537     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42538 
42539 
42540   # Publish this variable in the help.
42541 
42542 
42543   if [ -z "${NM+x}" ]; then
42544     # The variable is not set by user, try to locate tool using the code snippet
42545     if test -n "$ac_tool_prefix"; then
42546   for ac_prog in nm gcc-nm
42547   do
42548     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42549 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42551 $as_echo_n "checking for $ac_word... " >&6; }
42552 if ${ac_cv_prog_NM+:} false; then :
42553   $as_echo_n "(cached) " >&6
42554 else
42555   if test -n "$NM"; then
42556   ac_cv_prog_NM="$NM" # Let the user override the test.
42557 else
42558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42559 for as_dir in $PATH
42560 do
42561   IFS=$as_save_IFS
42562   test -z "$as_dir" && as_dir=.
42563     for ac_exec_ext in '' $ac_executable_extensions; do
42564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42565     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42567     break 2
42568   fi
42569 done
42570   done
42571 IFS=$as_save_IFS
42572 
42573 fi
42574 fi
42575 NM=$ac_cv_prog_NM
42576 if test -n "$NM"; then
42577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42578 $as_echo "$NM" >&6; }
42579 else
42580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42581 $as_echo "no" >&6; }
42582 fi
42583 
42584 
42585     test -n "$NM" && break
42586   done
42587 fi
42588 if test -z "$NM"; then
42589   ac_ct_NM=$NM
42590   for ac_prog in nm gcc-nm
42591 do
42592   # Extract the first word of "$ac_prog", so it can be a program name with args.
42593 set dummy $ac_prog; ac_word=$2
42594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42595 $as_echo_n "checking for $ac_word... " >&6; }
42596 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42597   $as_echo_n "(cached) " >&6
42598 else
42599   if test -n "$ac_ct_NM"; then
42600   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42601 else
42602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42603 for as_dir in $PATH
42604 do
42605   IFS=$as_save_IFS
42606   test -z "$as_dir" && as_dir=.
42607     for ac_exec_ext in '' $ac_executable_extensions; do
42608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42609     ac_cv_prog_ac_ct_NM="$ac_prog"
42610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42611     break 2
42612   fi
42613 done
42614   done
42615 IFS=$as_save_IFS
42616 
42617 fi
42618 fi
42619 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42620 if test -n "$ac_ct_NM"; then
42621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42622 $as_echo "$ac_ct_NM" >&6; }
42623 else
42624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42625 $as_echo "no" >&6; }
42626 fi
42627 
42628 
42629   test -n "$ac_ct_NM" && break
42630 done
42631 
42632   if test "x$ac_ct_NM" = x; then
42633     NM=""
42634   else
42635     case $cross_compiling:$ac_tool_warned in
42636 yes:)
42637 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42638 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42639 ac_tool_warned=yes ;;
42640 esac
42641     NM=$ac_ct_NM
42642   fi
42643 fi
42644 
42645   else
42646     # The variable is set, but is it from the command line or the environment?
42647 
42648     # Try to remove the string !NM! from our list.
42649     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42650     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42651       # If it failed, the variable was not from the command line. Ignore it,
42652       # but warn the user (except for BASH, which is always set by the calling BASH).
42653       if test "xNM" != xBASH; then
42654         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42655 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42656       fi
42657       # Try to locate tool using the code snippet
42658       if test -n "$ac_tool_prefix"; then
42659   for ac_prog in nm gcc-nm
42660   do
42661     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42662 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42664 $as_echo_n "checking for $ac_word... " >&6; }
42665 if ${ac_cv_prog_NM+:} false; then :
42666   $as_echo_n "(cached) " >&6
42667 else
42668   if test -n "$NM"; then
42669   ac_cv_prog_NM="$NM" # Let the user override the test.
42670 else
42671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42672 for as_dir in $PATH
42673 do
42674   IFS=$as_save_IFS
42675   test -z "$as_dir" && as_dir=.
42676     for ac_exec_ext in '' $ac_executable_extensions; do
42677   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42678     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42679     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42680     break 2
42681   fi
42682 done
42683   done
42684 IFS=$as_save_IFS
42685 
42686 fi
42687 fi
42688 NM=$ac_cv_prog_NM
42689 if test -n "$NM"; then
42690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42691 $as_echo "$NM" >&6; }
42692 else
42693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42694 $as_echo "no" >&6; }
42695 fi
42696 
42697 
42698     test -n "$NM" && break
42699   done
42700 fi
42701 if test -z "$NM"; then
42702   ac_ct_NM=$NM
42703   for ac_prog in nm gcc-nm
42704 do
42705   # Extract the first word of "$ac_prog", so it can be a program name with args.
42706 set dummy $ac_prog; ac_word=$2
42707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42708 $as_echo_n "checking for $ac_word... " >&6; }
42709 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42710   $as_echo_n "(cached) " >&6
42711 else
42712   if test -n "$ac_ct_NM"; then
42713   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42714 else
42715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42716 for as_dir in $PATH
42717 do
42718   IFS=$as_save_IFS
42719   test -z "$as_dir" && as_dir=.
42720     for ac_exec_ext in '' $ac_executable_extensions; do
42721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42722     ac_cv_prog_ac_ct_NM="$ac_prog"
42723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42724     break 2
42725   fi
42726 done
42727   done
42728 IFS=$as_save_IFS
42729 
42730 fi
42731 fi
42732 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42733 if test -n "$ac_ct_NM"; then
42734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42735 $as_echo "$ac_ct_NM" >&6; }
42736 else
42737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42738 $as_echo "no" >&6; }
42739 fi
42740 
42741 
42742   test -n "$ac_ct_NM" && break
42743 done
42744 
42745   if test "x$ac_ct_NM" = x; then
42746     NM=""
42747   else
42748     case $cross_compiling:$ac_tool_warned in
42749 yes:)
42750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42751 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42752 ac_tool_warned=yes ;;
42753 esac
42754     NM=$ac_ct_NM
42755   fi
42756 fi
42757 
42758     else
42759       # If it succeeded, then it was overridden by the user. We will use it
42760       # for the tool.
42761 
42762       # First remove it from the list of overridden variables, so we can test
42763       # for unknown variables in the end.
42764       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42765 
42766       # Check if we try to supply an empty value
42767       if test "x$NM" = x; then
42768         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42769 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42770         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42771 $as_echo_n "checking for NM... " >&6; }
42772         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42773 $as_echo "disabled" >&6; }
42774       else
42775         # Check if the provided tool contains a complete path.
42776         tool_specified="$NM"
42777         tool_basename="${tool_specified##*/}"
42778         if test "x$tool_basename" = "x$tool_specified"; then
42779           # A command without a complete path is provided, search $PATH.
42780           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42781 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42782           # Extract the first word of "$tool_basename", so it can be a program name with args.
42783 set dummy $tool_basename; ac_word=$2
42784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42785 $as_echo_n "checking for $ac_word... " >&6; }
42786 if ${ac_cv_path_NM+:} false; then :
42787   $as_echo_n "(cached) " >&6
42788 else
42789   case $NM in
42790   [\\/]* | ?:[\\/]*)
42791   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42792   ;;
42793   *)
42794   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42795 for as_dir in $PATH
42796 do
42797   IFS=$as_save_IFS
42798   test -z "$as_dir" && as_dir=.
42799     for ac_exec_ext in '' $ac_executable_extensions; do
42800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42801     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42803     break 2
42804   fi
42805 done
42806   done
42807 IFS=$as_save_IFS
42808 
42809   ;;
42810 esac
42811 fi
42812 NM=$ac_cv_path_NM
42813 if test -n "$NM"; then
42814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42815 $as_echo "$NM" >&6; }
42816 else
42817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42818 $as_echo "no" >&6; }
42819 fi
42820 
42821 
42822           if test "x$NM" = x; then
42823             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42824           fi
42825         else
42826           # Otherwise we believe it is a complete path. Use it as it is.
42827           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42828 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42829           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42830 $as_echo_n "checking for NM... " >&6; }
42831           if test ! -x "$tool_specified"; then
42832             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42833 $as_echo "not found" >&6; }
42834             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42835           fi
42836           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42837 $as_echo "$tool_specified" >&6; }
42838         fi
42839       fi
42840     fi
42841 
42842   fi
42843 
42844 
42845     else
42846 
42847 
42848   # Publish this variable in the help.
42849 
42850 
42851   if [ -z "${NM+x}" ]; then
42852     # The variable is not set by user, try to locate tool using the code snippet
42853     if test -n "$ac_tool_prefix"; then
42854   for ac_prog in nm
42855   do
42856     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42857 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42859 $as_echo_n "checking for $ac_word... " >&6; }
42860 if ${ac_cv_prog_NM+:} false; then :
42861   $as_echo_n "(cached) " >&6
42862 else
42863   if test -n "$NM"; then
42864   ac_cv_prog_NM="$NM" # Let the user override the test.
42865 else
42866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42867 for as_dir in $PATH
42868 do
42869   IFS=$as_save_IFS
42870   test -z "$as_dir" && as_dir=.
42871     for ac_exec_ext in '' $ac_executable_extensions; do
42872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42873     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42875     break 2
42876   fi
42877 done
42878   done
42879 IFS=$as_save_IFS
42880 
42881 fi
42882 fi
42883 NM=$ac_cv_prog_NM
42884 if test -n "$NM"; then
42885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42886 $as_echo "$NM" >&6; }
42887 else
42888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42889 $as_echo "no" >&6; }
42890 fi
42891 
42892 
42893     test -n "$NM" && break
42894   done
42895 fi
42896 if test -z "$NM"; then
42897   ac_ct_NM=$NM
42898   for ac_prog in nm
42899 do
42900   # Extract the first word of "$ac_prog", so it can be a program name with args.
42901 set dummy $ac_prog; ac_word=$2
42902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42903 $as_echo_n "checking for $ac_word... " >&6; }
42904 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42905   $as_echo_n "(cached) " >&6
42906 else
42907   if test -n "$ac_ct_NM"; then
42908   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42909 else
42910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42911 for as_dir in $PATH
42912 do
42913   IFS=$as_save_IFS
42914   test -z "$as_dir" && as_dir=.
42915     for ac_exec_ext in '' $ac_executable_extensions; do
42916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42917     ac_cv_prog_ac_ct_NM="$ac_prog"
42918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42919     break 2
42920   fi
42921 done
42922   done
42923 IFS=$as_save_IFS
42924 
42925 fi
42926 fi
42927 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42928 if test -n "$ac_ct_NM"; then
42929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42930 $as_echo "$ac_ct_NM" >&6; }
42931 else
42932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42933 $as_echo "no" >&6; }
42934 fi
42935 
42936 
42937   test -n "$ac_ct_NM" && break
42938 done
42939 
42940   if test "x$ac_ct_NM" = x; then
42941     NM=""
42942   else
42943     case $cross_compiling:$ac_tool_warned in
42944 yes:)
42945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42946 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42947 ac_tool_warned=yes ;;
42948 esac
42949     NM=$ac_ct_NM
42950   fi
42951 fi
42952 
42953   else
42954     # The variable is set, but is it from the command line or the environment?
42955 
42956     # Try to remove the string !NM! from our list.
42957     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42958     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42959       # If it failed, the variable was not from the command line. Ignore it,
42960       # but warn the user (except for BASH, which is always set by the calling BASH).
42961       if test "xNM" != xBASH; then
42962         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42963 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42964       fi
42965       # Try to locate tool using the code snippet
42966       if test -n "$ac_tool_prefix"; then
42967   for ac_prog in nm
42968   do
42969     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42970 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42972 $as_echo_n "checking for $ac_word... " >&6; }
42973 if ${ac_cv_prog_NM+:} false; then :
42974   $as_echo_n "(cached) " >&6
42975 else
42976   if test -n "$NM"; then
42977   ac_cv_prog_NM="$NM" # Let the user override the test.
42978 else
42979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42980 for as_dir in $PATH
42981 do
42982   IFS=$as_save_IFS
42983   test -z "$as_dir" && as_dir=.
42984     for ac_exec_ext in '' $ac_executable_extensions; do
42985   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42986     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42988     break 2
42989   fi
42990 done
42991   done
42992 IFS=$as_save_IFS
42993 
42994 fi
42995 fi
42996 NM=$ac_cv_prog_NM
42997 if test -n "$NM"; then
42998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42999 $as_echo "$NM" >&6; }
43000 else
43001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43002 $as_echo "no" >&6; }
43003 fi
43004 
43005 
43006     test -n "$NM" && break
43007   done
43008 fi
43009 if test -z "$NM"; then
43010   ac_ct_NM=$NM
43011   for ac_prog in nm
43012 do
43013   # Extract the first word of "$ac_prog", so it can be a program name with args.
43014 set dummy $ac_prog; ac_word=$2
43015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43016 $as_echo_n "checking for $ac_word... " >&6; }
43017 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43018   $as_echo_n "(cached) " >&6
43019 else
43020   if test -n "$ac_ct_NM"; then
43021   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43022 else
43023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43024 for as_dir in $PATH
43025 do
43026   IFS=$as_save_IFS
43027   test -z "$as_dir" && as_dir=.
43028     for ac_exec_ext in '' $ac_executable_extensions; do
43029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43030     ac_cv_prog_ac_ct_NM="$ac_prog"
43031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43032     break 2
43033   fi
43034 done
43035   done
43036 IFS=$as_save_IFS
43037 
43038 fi
43039 fi
43040 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43041 if test -n "$ac_ct_NM"; then
43042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43043 $as_echo "$ac_ct_NM" >&6; }
43044 else
43045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43046 $as_echo "no" >&6; }
43047 fi
43048 
43049 
43050   test -n "$ac_ct_NM" && break
43051 done
43052 
43053   if test "x$ac_ct_NM" = x; then
43054     NM=""
43055   else
43056     case $cross_compiling:$ac_tool_warned in
43057 yes:)
43058 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43059 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43060 ac_tool_warned=yes ;;
43061 esac
43062     NM=$ac_ct_NM
43063   fi
43064 fi
43065 
43066     else
43067       # If it succeeded, then it was overridden by the user. We will use it
43068       # for the tool.
43069 
43070       # First remove it from the list of overridden variables, so we can test
43071       # for unknown variables in the end.
43072       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43073 
43074       # Check if we try to supply an empty value
43075       if test "x$NM" = x; then
43076         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43077 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43079 $as_echo_n "checking for NM... " >&6; }
43080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43081 $as_echo "disabled" >&6; }
43082       else
43083         # Check if the provided tool contains a complete path.
43084         tool_specified="$NM"
43085         tool_basename="${tool_specified##*/}"
43086         if test "x$tool_basename" = "x$tool_specified"; then
43087           # A command without a complete path is provided, search $PATH.
43088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43089 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43090           # Extract the first word of "$tool_basename", so it can be a program name with args.
43091 set dummy $tool_basename; ac_word=$2
43092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43093 $as_echo_n "checking for $ac_word... " >&6; }
43094 if ${ac_cv_path_NM+:} false; then :
43095   $as_echo_n "(cached) " >&6
43096 else
43097   case $NM in
43098   [\\/]* | ?:[\\/]*)
43099   ac_cv_path_NM="$NM" # Let the user override the test with a path.
43100   ;;
43101   *)
43102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43103 for as_dir in $PATH
43104 do
43105   IFS=$as_save_IFS
43106   test -z "$as_dir" && as_dir=.
43107     for ac_exec_ext in '' $ac_executable_extensions; do
43108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43109     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43111     break 2
43112   fi
43113 done
43114   done
43115 IFS=$as_save_IFS
43116 
43117   ;;
43118 esac
43119 fi
43120 NM=$ac_cv_path_NM
43121 if test -n "$NM"; then
43122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43123 $as_echo "$NM" >&6; }
43124 else
43125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43126 $as_echo "no" >&6; }
43127 fi
43128 
43129 
43130           if test "x$NM" = x; then
43131             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43132           fi
43133         else
43134           # Otherwise we believe it is a complete path. Use it as it is.
43135           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43136 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43137           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43138 $as_echo_n "checking for NM... " >&6; }
43139           if test ! -x "$tool_specified"; then
43140             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43141 $as_echo "not found" >&6; }
43142             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43143           fi
43144           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43145 $as_echo "$tool_specified" >&6; }
43146         fi
43147       fi
43148     fi
43149 
43150   fi
43151 
43152 
43153     fi
43154 
43155   # Only process if variable expands to non-empty
43156 
43157   if test "x$NM" != x; then
43158     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43159 
43160   # First separate the path from the arguments. This will split at the first
43161   # space.
43162   complete="$NM"
43163   path="${complete%% *}"
43164   tmp="$complete EOL"
43165   arguments="${tmp#* }"
43166 
43167   # Input might be given as Windows format, start by converting to
43168   # unix format.
43169   new_path=`$CYGPATH -u "$path"`
43170 
43171   # Now try to locate executable using which
43172   new_path=`$WHICH "$new_path" 2> /dev/null`
43173   # bat and cmd files are not always considered executable in cygwin causing which
43174   # to not find them
43175   if test "x$new_path" = x \
43176       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43177       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43178     new_path=`$CYGPATH -u "$path"`
43179   fi
43180   if test "x$new_path" = x; then
43181     # Oops. Which didn't find the executable.
43182     # The splitting of arguments from the executable at a space might have been incorrect,
43183     # since paths with space are more likely in Windows. Give it another try with the whole
43184     # argument.
43185     path="$complete"
43186     arguments="EOL"
43187     new_path=`$CYGPATH -u "$path"`
43188     new_path=`$WHICH "$new_path" 2> /dev/null`
43189     # bat and cmd files are not always considered executable in cygwin causing which
43190     # to not find them
43191     if test "x$new_path" = x \
43192         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43193         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43194       new_path=`$CYGPATH -u "$path"`
43195     fi
43196     if test "x$new_path" = x; then
43197       # It's still not found. Now this is an unrecoverable error.
43198       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43199 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43200       has_space=`$ECHO "$complete" | $GREP " "`
43201       if test "x$has_space" != x; then
43202         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43203 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43204       fi
43205       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43206     fi
43207   fi
43208 
43209   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43210   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43211   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43212   # "foo.exe" is OK but "foo" is an error.
43213   #
43214   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43215   # It is also a way to make sure we got the proper file name for the real test later on.
43216   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43217   if test "x$test_shortpath" = x; then
43218     # Short path failed, file does not exist as specified.
43219     # Try adding .exe or .cmd
43220     if test -f "${new_path}.exe"; then
43221       input_to_shortpath="${new_path}.exe"
43222     elif test -f "${new_path}.cmd"; then
43223       input_to_shortpath="${new_path}.cmd"
43224     else
43225       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43226 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43227       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43228 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43229       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43230     fi
43231   else
43232     input_to_shortpath="$new_path"
43233   fi
43234 
43235   # Call helper function which possibly converts this using DOS-style short mode.
43236   # If so, the updated path is stored in $new_path.
43237   new_path="$input_to_shortpath"
43238 
43239   input_path="$input_to_shortpath"
43240   # Check if we need to convert this using DOS-style short mode. If the path
43241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43242   # take no chances and rewrite it.
43243   # Note: m4 eats our [], so we need to use [ and ] instead.
43244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43245   if test "x$has_forbidden_chars" != x; then
43246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43247     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43248     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43249     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43250       # Going to short mode and back again did indeed matter. Since short mode is
43251       # case insensitive, let's make it lowercase to improve readability.
43252       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43253       # Now convert it back to Unix-style (cygpath)
43254       input_path=`$CYGPATH -u "$shortmode_path"`
43255       new_path="$input_path"
43256     fi
43257   fi
43258 
43259   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43260   if test "x$test_cygdrive_prefix" = x; then
43261     # As a simple fix, exclude /usr/bin since it's not a real path.
43262     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43263       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43264       # a path prefixed by /cygdrive for fixpath to work.
43265       new_path="$CYGWIN_ROOT_PATH$input_path"
43266     fi
43267   fi
43268 
43269   # remove trailing .exe if any
43270   new_path="${new_path/%.exe/}"
43271 
43272     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43273 
43274   # First separate the path from the arguments. This will split at the first
43275   # space.
43276   complete="$NM"
43277   path="${complete%% *}"
43278   tmp="$complete EOL"
43279   arguments="${tmp#* }"
43280 
43281   # Input might be given as Windows format, start by converting to
43282   # unix format.
43283   new_path="$path"
43284 
43285   windows_path="$new_path"
43286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43287     unix_path=`$CYGPATH -u "$windows_path"`
43288     new_path="$unix_path"
43289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43291     new_path="$unix_path"
43292   fi
43293 
43294 
43295   # Now try to locate executable using which
43296   new_path=`$WHICH "$new_path" 2> /dev/null`
43297 
43298   if test "x$new_path" = x; then
43299     # Oops. Which didn't find the executable.
43300     # The splitting of arguments from the executable at a space might have been incorrect,
43301     # since paths with space are more likely in Windows. Give it another try with the whole
43302     # argument.
43303     path="$complete"
43304     arguments="EOL"
43305     new_path="$path"
43306 
43307   windows_path="$new_path"
43308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43309     unix_path=`$CYGPATH -u "$windows_path"`
43310     new_path="$unix_path"
43311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43313     new_path="$unix_path"
43314   fi
43315 
43316 
43317     new_path=`$WHICH "$new_path" 2> /dev/null`
43318     # bat and cmd files are not always considered executable in MSYS causing which
43319     # to not find them
43320     if test "x$new_path" = x \
43321         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43322         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43323       new_path="$path"
43324 
43325   windows_path="$new_path"
43326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43327     unix_path=`$CYGPATH -u "$windows_path"`
43328     new_path="$unix_path"
43329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43331     new_path="$unix_path"
43332   fi
43333 
43334     fi
43335 
43336     if test "x$new_path" = x; then
43337       # It's still not found. Now this is an unrecoverable error.
43338       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43339 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43340       has_space=`$ECHO "$complete" | $GREP " "`
43341       if test "x$has_space" != x; then
43342         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43343 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43344       fi
43345       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43346     fi
43347   fi
43348 
43349   # Now new_path has a complete unix path to the binary
43350   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43351     # Keep paths in /bin as-is, but remove trailing .exe if any
43352     new_path="${new_path/%.exe/}"
43353     # Do not save /bin paths to all_fixpath_prefixes!
43354   else
43355     # Not in mixed or Windows style, start by that.
43356     new_path=`cmd //c echo $new_path`
43357 
43358   input_path="$new_path"
43359   # Check if we need to convert this using DOS-style short mode. If the path
43360   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43361   # take no chances and rewrite it.
43362   # Note: m4 eats our [], so we need to use [ and ] instead.
43363   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43364   if test "x$has_forbidden_chars" != x; then
43365     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43366     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43367   fi
43368 
43369     # Output is in $new_path
43370 
43371   windows_path="$new_path"
43372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43373     unix_path=`$CYGPATH -u "$windows_path"`
43374     new_path="$unix_path"
43375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43377     new_path="$unix_path"
43378   fi
43379 
43380     # remove trailing .exe if any
43381     new_path="${new_path/%.exe/}"
43382 
43383     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43384     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43385   fi
43386 
43387     else
43388       # We're on a unix platform. Hooray! :)
43389       # First separate the path from the arguments. This will split at the first
43390       # space.
43391       complete="$NM"
43392       path="${complete%% *}"
43393       tmp="$complete EOL"
43394       arguments="${tmp#* }"
43395 
43396       # Cannot rely on the command "which" here since it doesn't always work.
43397       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43398       if test -z "$is_absolute_path"; then
43399         # Path to executable is not absolute. Find it.
43400         IFS_save="$IFS"
43401         IFS=:
43402         for p in $PATH; do
43403           if test -f "$p/$path" && test -x "$p/$path"; then
43404             new_path="$p/$path"
43405             break
43406           fi
43407         done
43408         IFS="$IFS_save"
43409       else
43410         # This is an absolute path, we can use it without further modifications.
43411         new_path="$path"
43412       fi
43413 
43414       if test "x$new_path" = x; then
43415         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43416 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43417         has_space=`$ECHO "$complete" | $GREP " "`
43418         if test "x$has_space" != x; then
43419           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43420 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43421         fi
43422         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43423       fi
43424     fi
43425 
43426     # Now join together the path and the arguments once again
43427     if test "x$arguments" != xEOL; then
43428       new_complete="$new_path ${arguments% *}"
43429     else
43430       new_complete="$new_path"
43431     fi
43432 
43433     if test "x$complete" != "x$new_complete"; then
43434       NM="$new_complete"
43435       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43436 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43437     fi
43438   fi
43439 
43440     GNM="$NM"
43441 
43442   fi
43443 
43444   # objcopy is used for moving debug symbols to separate files when
43445   # full debug symbols are enabled.
43446   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43447 
43448 
43449   # Publish this variable in the help.
43450 
43451 
43452   if [ -z "${OBJCOPY+x}" ]; then
43453     # The variable is not set by user, try to locate tool using the code snippet
43454     if test -n "$ac_tool_prefix"; then
43455   for ac_prog in gobjcopy objcopy
43456   do
43457     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43458 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43460 $as_echo_n "checking for $ac_word... " >&6; }
43461 if ${ac_cv_prog_OBJCOPY+:} false; then :
43462   $as_echo_n "(cached) " >&6
43463 else
43464   if test -n "$OBJCOPY"; then
43465   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43466 else
43467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43468 for as_dir in $PATH
43469 do
43470   IFS=$as_save_IFS
43471   test -z "$as_dir" && as_dir=.
43472     for ac_exec_ext in '' $ac_executable_extensions; do
43473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43474     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43476     break 2
43477   fi
43478 done
43479   done
43480 IFS=$as_save_IFS
43481 
43482 fi
43483 fi
43484 OBJCOPY=$ac_cv_prog_OBJCOPY
43485 if test -n "$OBJCOPY"; then
43486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43487 $as_echo "$OBJCOPY" >&6; }
43488 else
43489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43490 $as_echo "no" >&6; }
43491 fi
43492 
43493 
43494     test -n "$OBJCOPY" && break
43495   done
43496 fi
43497 if test -z "$OBJCOPY"; then
43498   ac_ct_OBJCOPY=$OBJCOPY
43499   for ac_prog in gobjcopy objcopy
43500 do
43501   # Extract the first word of "$ac_prog", so it can be a program name with args.
43502 set dummy $ac_prog; ac_word=$2
43503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43504 $as_echo_n "checking for $ac_word... " >&6; }
43505 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43506   $as_echo_n "(cached) " >&6
43507 else
43508   if test -n "$ac_ct_OBJCOPY"; then
43509   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43510 else
43511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43512 for as_dir in $PATH
43513 do
43514   IFS=$as_save_IFS
43515   test -z "$as_dir" && as_dir=.
43516     for ac_exec_ext in '' $ac_executable_extensions; do
43517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43518     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43520     break 2
43521   fi
43522 done
43523   done
43524 IFS=$as_save_IFS
43525 
43526 fi
43527 fi
43528 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43529 if test -n "$ac_ct_OBJCOPY"; then
43530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43531 $as_echo "$ac_ct_OBJCOPY" >&6; }
43532 else
43533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43534 $as_echo "no" >&6; }
43535 fi
43536 
43537 
43538   test -n "$ac_ct_OBJCOPY" && break
43539 done
43540 
43541   if test "x$ac_ct_OBJCOPY" = x; then
43542     OBJCOPY=""
43543   else
43544     case $cross_compiling:$ac_tool_warned in
43545 yes:)
43546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43547 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43548 ac_tool_warned=yes ;;
43549 esac
43550     OBJCOPY=$ac_ct_OBJCOPY
43551   fi
43552 fi
43553 
43554   else
43555     # The variable is set, but is it from the command line or the environment?
43556 
43557     # Try to remove the string !OBJCOPY! from our list.
43558     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43559     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43560       # If it failed, the variable was not from the command line. Ignore it,
43561       # but warn the user (except for BASH, which is always set by the calling BASH).
43562       if test "xOBJCOPY" != xBASH; then
43563         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43564 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43565       fi
43566       # Try to locate tool using the code snippet
43567       if test -n "$ac_tool_prefix"; then
43568   for ac_prog in gobjcopy objcopy
43569   do
43570     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43571 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43573 $as_echo_n "checking for $ac_word... " >&6; }
43574 if ${ac_cv_prog_OBJCOPY+:} false; then :
43575   $as_echo_n "(cached) " >&6
43576 else
43577   if test -n "$OBJCOPY"; then
43578   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43579 else
43580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43581 for as_dir in $PATH
43582 do
43583   IFS=$as_save_IFS
43584   test -z "$as_dir" && as_dir=.
43585     for ac_exec_ext in '' $ac_executable_extensions; do
43586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43587     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43589     break 2
43590   fi
43591 done
43592   done
43593 IFS=$as_save_IFS
43594 
43595 fi
43596 fi
43597 OBJCOPY=$ac_cv_prog_OBJCOPY
43598 if test -n "$OBJCOPY"; then
43599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43600 $as_echo "$OBJCOPY" >&6; }
43601 else
43602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43603 $as_echo "no" >&6; }
43604 fi
43605 
43606 
43607     test -n "$OBJCOPY" && break
43608   done
43609 fi
43610 if test -z "$OBJCOPY"; then
43611   ac_ct_OBJCOPY=$OBJCOPY
43612   for ac_prog in gobjcopy objcopy
43613 do
43614   # Extract the first word of "$ac_prog", so it can be a program name with args.
43615 set dummy $ac_prog; ac_word=$2
43616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43617 $as_echo_n "checking for $ac_word... " >&6; }
43618 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43619   $as_echo_n "(cached) " >&6
43620 else
43621   if test -n "$ac_ct_OBJCOPY"; then
43622   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43623 else
43624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43625 for as_dir in $PATH
43626 do
43627   IFS=$as_save_IFS
43628   test -z "$as_dir" && as_dir=.
43629     for ac_exec_ext in '' $ac_executable_extensions; do
43630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43631     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43633     break 2
43634   fi
43635 done
43636   done
43637 IFS=$as_save_IFS
43638 
43639 fi
43640 fi
43641 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43642 if test -n "$ac_ct_OBJCOPY"; then
43643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43644 $as_echo "$ac_ct_OBJCOPY" >&6; }
43645 else
43646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43647 $as_echo "no" >&6; }
43648 fi
43649 
43650 
43651   test -n "$ac_ct_OBJCOPY" && break
43652 done
43653 
43654   if test "x$ac_ct_OBJCOPY" = x; then
43655     OBJCOPY=""
43656   else
43657     case $cross_compiling:$ac_tool_warned in
43658 yes:)
43659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43660 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43661 ac_tool_warned=yes ;;
43662 esac
43663     OBJCOPY=$ac_ct_OBJCOPY
43664   fi
43665 fi
43666 
43667     else
43668       # If it succeeded, then it was overridden by the user. We will use it
43669       # for the tool.
43670 
43671       # First remove it from the list of overridden variables, so we can test
43672       # for unknown variables in the end.
43673       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43674 
43675       # Check if we try to supply an empty value
43676       if test "x$OBJCOPY" = x; then
43677         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43678 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43679         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43680 $as_echo_n "checking for OBJCOPY... " >&6; }
43681         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43682 $as_echo "disabled" >&6; }
43683       else
43684         # Check if the provided tool contains a complete path.
43685         tool_specified="$OBJCOPY"
43686         tool_basename="${tool_specified##*/}"
43687         if test "x$tool_basename" = "x$tool_specified"; then
43688           # A command without a complete path is provided, search $PATH.
43689           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43690 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43691           # Extract the first word of "$tool_basename", so it can be a program name with args.
43692 set dummy $tool_basename; ac_word=$2
43693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43694 $as_echo_n "checking for $ac_word... " >&6; }
43695 if ${ac_cv_path_OBJCOPY+:} false; then :
43696   $as_echo_n "(cached) " >&6
43697 else
43698   case $OBJCOPY in
43699   [\\/]* | ?:[\\/]*)
43700   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43701   ;;
43702   *)
43703   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43704 for as_dir in $PATH
43705 do
43706   IFS=$as_save_IFS
43707   test -z "$as_dir" && as_dir=.
43708     for ac_exec_ext in '' $ac_executable_extensions; do
43709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43710     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43712     break 2
43713   fi
43714 done
43715   done
43716 IFS=$as_save_IFS
43717 
43718   ;;
43719 esac
43720 fi
43721 OBJCOPY=$ac_cv_path_OBJCOPY
43722 if test -n "$OBJCOPY"; then
43723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43724 $as_echo "$OBJCOPY" >&6; }
43725 else
43726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43727 $as_echo "no" >&6; }
43728 fi
43729 
43730 
43731           if test "x$OBJCOPY" = x; then
43732             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43733           fi
43734         else
43735           # Otherwise we believe it is a complete path. Use it as it is.
43736           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43737 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43738           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43739 $as_echo_n "checking for OBJCOPY... " >&6; }
43740           if test ! -x "$tool_specified"; then
43741             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43742 $as_echo "not found" >&6; }
43743             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43744           fi
43745           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43746 $as_echo "$tool_specified" >&6; }
43747         fi
43748       fi
43749     fi
43750 
43751   fi
43752 
43753 
43754     # Only call fixup if objcopy was found.
43755     if test -n "$OBJCOPY"; then
43756 
43757   # Only process if variable expands to non-empty
43758 
43759   if test "x$OBJCOPY" != x; then
43760     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43761 
43762   # First separate the path from the arguments. This will split at the first
43763   # space.
43764   complete="$OBJCOPY"
43765   path="${complete%% *}"
43766   tmp="$complete EOL"
43767   arguments="${tmp#* }"
43768 
43769   # Input might be given as Windows format, start by converting to
43770   # unix format.
43771   new_path=`$CYGPATH -u "$path"`
43772 
43773   # Now try to locate executable using which
43774   new_path=`$WHICH "$new_path" 2> /dev/null`
43775   # bat and cmd files are not always considered executable in cygwin causing which
43776   # to not find them
43777   if test "x$new_path" = x \
43778       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43779       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43780     new_path=`$CYGPATH -u "$path"`
43781   fi
43782   if test "x$new_path" = x; then
43783     # Oops. Which didn't find the executable.
43784     # The splitting of arguments from the executable at a space might have been incorrect,
43785     # since paths with space are more likely in Windows. Give it another try with the whole
43786     # argument.
43787     path="$complete"
43788     arguments="EOL"
43789     new_path=`$CYGPATH -u "$path"`
43790     new_path=`$WHICH "$new_path" 2> /dev/null`
43791     # bat and cmd files are not always considered executable in cygwin causing which
43792     # to not find them
43793     if test "x$new_path" = x \
43794         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43795         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43796       new_path=`$CYGPATH -u "$path"`
43797     fi
43798     if test "x$new_path" = x; then
43799       # It's still not found. Now this is an unrecoverable error.
43800       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43801 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43802       has_space=`$ECHO "$complete" | $GREP " "`
43803       if test "x$has_space" != x; then
43804         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43805 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43806       fi
43807       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43808     fi
43809   fi
43810 
43811   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43812   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43813   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43814   # "foo.exe" is OK but "foo" is an error.
43815   #
43816   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43817   # It is also a way to make sure we got the proper file name for the real test later on.
43818   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43819   if test "x$test_shortpath" = x; then
43820     # Short path failed, file does not exist as specified.
43821     # Try adding .exe or .cmd
43822     if test -f "${new_path}.exe"; then
43823       input_to_shortpath="${new_path}.exe"
43824     elif test -f "${new_path}.cmd"; then
43825       input_to_shortpath="${new_path}.cmd"
43826     else
43827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43828 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43829       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43830 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43831       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43832     fi
43833   else
43834     input_to_shortpath="$new_path"
43835   fi
43836 
43837   # Call helper function which possibly converts this using DOS-style short mode.
43838   # If so, the updated path is stored in $new_path.
43839   new_path="$input_to_shortpath"
43840 
43841   input_path="$input_to_shortpath"
43842   # Check if we need to convert this using DOS-style short mode. If the path
43843   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43844   # take no chances and rewrite it.
43845   # Note: m4 eats our [], so we need to use [ and ] instead.
43846   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43847   if test "x$has_forbidden_chars" != x; then
43848     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43849     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43850     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43851     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43852       # Going to short mode and back again did indeed matter. Since short mode is
43853       # case insensitive, let's make it lowercase to improve readability.
43854       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43855       # Now convert it back to Unix-style (cygpath)
43856       input_path=`$CYGPATH -u "$shortmode_path"`
43857       new_path="$input_path"
43858     fi
43859   fi
43860 
43861   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43862   if test "x$test_cygdrive_prefix" = x; then
43863     # As a simple fix, exclude /usr/bin since it's not a real path.
43864     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43865       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43866       # a path prefixed by /cygdrive for fixpath to work.
43867       new_path="$CYGWIN_ROOT_PATH$input_path"
43868     fi
43869   fi
43870 
43871   # remove trailing .exe if any
43872   new_path="${new_path/%.exe/}"
43873 
43874     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43875 
43876   # First separate the path from the arguments. This will split at the first
43877   # space.
43878   complete="$OBJCOPY"
43879   path="${complete%% *}"
43880   tmp="$complete EOL"
43881   arguments="${tmp#* }"
43882 
43883   # Input might be given as Windows format, start by converting to
43884   # unix format.
43885   new_path="$path"
43886 
43887   windows_path="$new_path"
43888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43889     unix_path=`$CYGPATH -u "$windows_path"`
43890     new_path="$unix_path"
43891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43892     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43893     new_path="$unix_path"
43894   fi
43895 
43896 
43897   # Now try to locate executable using which
43898   new_path=`$WHICH "$new_path" 2> /dev/null`
43899 
43900   if test "x$new_path" = x; then
43901     # Oops. Which didn't find the executable.
43902     # The splitting of arguments from the executable at a space might have been incorrect,
43903     # since paths with space are more likely in Windows. Give it another try with the whole
43904     # argument.
43905     path="$complete"
43906     arguments="EOL"
43907     new_path="$path"
43908 
43909   windows_path="$new_path"
43910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43911     unix_path=`$CYGPATH -u "$windows_path"`
43912     new_path="$unix_path"
43913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43915     new_path="$unix_path"
43916   fi
43917 
43918 
43919     new_path=`$WHICH "$new_path" 2> /dev/null`
43920     # bat and cmd files are not always considered executable in MSYS causing which
43921     # to not find them
43922     if test "x$new_path" = x \
43923         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43924         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43925       new_path="$path"
43926 
43927   windows_path="$new_path"
43928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43929     unix_path=`$CYGPATH -u "$windows_path"`
43930     new_path="$unix_path"
43931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43933     new_path="$unix_path"
43934   fi
43935 
43936     fi
43937 
43938     if test "x$new_path" = x; then
43939       # It's still not found. Now this is an unrecoverable error.
43940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43941 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43942       has_space=`$ECHO "$complete" | $GREP " "`
43943       if test "x$has_space" != x; then
43944         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43945 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43946       fi
43947       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43948     fi
43949   fi
43950 
43951   # Now new_path has a complete unix path to the binary
43952   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43953     # Keep paths in /bin as-is, but remove trailing .exe if any
43954     new_path="${new_path/%.exe/}"
43955     # Do not save /bin paths to all_fixpath_prefixes!
43956   else
43957     # Not in mixed or Windows style, start by that.
43958     new_path=`cmd //c echo $new_path`
43959 
43960   input_path="$new_path"
43961   # Check if we need to convert this using DOS-style short mode. If the path
43962   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43963   # take no chances and rewrite it.
43964   # Note: m4 eats our [], so we need to use [ and ] instead.
43965   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43966   if test "x$has_forbidden_chars" != x; then
43967     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43968     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43969   fi
43970 
43971     # Output is in $new_path
43972 
43973   windows_path="$new_path"
43974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43975     unix_path=`$CYGPATH -u "$windows_path"`
43976     new_path="$unix_path"
43977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43979     new_path="$unix_path"
43980   fi
43981 
43982     # remove trailing .exe if any
43983     new_path="${new_path/%.exe/}"
43984 
43985     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43986     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43987   fi
43988 
43989     else
43990       # We're on a unix platform. Hooray! :)
43991       # First separate the path from the arguments. This will split at the first
43992       # space.
43993       complete="$OBJCOPY"
43994       path="${complete%% *}"
43995       tmp="$complete EOL"
43996       arguments="${tmp#* }"
43997 
43998       # Cannot rely on the command "which" here since it doesn't always work.
43999       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44000       if test -z "$is_absolute_path"; then
44001         # Path to executable is not absolute. Find it.
44002         IFS_save="$IFS"
44003         IFS=:
44004         for p in $PATH; do
44005           if test -f "$p/$path" && test -x "$p/$path"; then
44006             new_path="$p/$path"
44007             break
44008           fi
44009         done
44010         IFS="$IFS_save"
44011       else
44012         # This is an absolute path, we can use it without further modifications.
44013         new_path="$path"
44014       fi
44015 
44016       if test "x$new_path" = x; then
44017         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44018 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44019         has_space=`$ECHO "$complete" | $GREP " "`
44020         if test "x$has_space" != x; then
44021           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44022 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44023         fi
44024         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44025       fi
44026     fi
44027 
44028     # Now join together the path and the arguments once again
44029     if test "x$arguments" != xEOL; then
44030       new_complete="$new_path ${arguments% *}"
44031     else
44032       new_complete="$new_path"
44033     fi
44034 
44035     if test "x$complete" != "x$new_complete"; then
44036       OBJCOPY="$new_complete"
44037       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44038 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44039     fi
44040   fi
44041 
44042       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44043         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44044         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44045         # - version number is last blank separate word on first line
44046         # - version number formats that have been seen:
44047         #   - <major>.<minor>
44048         #   - <major>.<minor>.<micro>
44049         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44050         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44051          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44052               -e 's/.* //' \
44053               -e '/^[01]\./b bad' \
44054               -e '/^2\./{' \
44055               -e '  s/^2\.//' \
44056               -e '  /^[0-9]$/b bad' \
44057               -e '  /^[0-9]\./b bad' \
44058               -e '  /^1[0-9]$/b bad' \
44059               -e '  /^1[0-9]\./b bad' \
44060               -e '  /^20\./b bad' \
44061               -e '  /^21\.0$/b bad' \
44062               -e '  /^21\.0\./b bad' \
44063               -e '}' \
44064               -e ':good' \
44065               -e 's/.*/VALID_VERSION/p' \
44066               -e 'q' \
44067               -e ':bad' \
44068               -e 's/.*/BAD_VERSION/p' \
44069               -e 'q'`
44070         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44071           OBJCOPY=
44072           { $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
44073 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44074           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44075 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44076           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44077 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44078           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44079 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44080           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44081 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44082         fi
44083       fi
44084     fi
44085   fi
44086 
44087 
44088 
44089   # Publish this variable in the help.
44090 
44091 
44092   if [ -z "${OBJDUMP+x}" ]; then
44093     # The variable is not set by user, try to locate tool using the code snippet
44094     if test -n "$ac_tool_prefix"; then
44095   for ac_prog in gobjdump objdump
44096   do
44097     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44098 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44100 $as_echo_n "checking for $ac_word... " >&6; }
44101 if ${ac_cv_prog_OBJDUMP+:} false; then :
44102   $as_echo_n "(cached) " >&6
44103 else
44104   if test -n "$OBJDUMP"; then
44105   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44106 else
44107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44108 for as_dir in $PATH
44109 do
44110   IFS=$as_save_IFS
44111   test -z "$as_dir" && as_dir=.
44112     for ac_exec_ext in '' $ac_executable_extensions; do
44113   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44114     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44115     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44116     break 2
44117   fi
44118 done
44119   done
44120 IFS=$as_save_IFS
44121 
44122 fi
44123 fi
44124 OBJDUMP=$ac_cv_prog_OBJDUMP
44125 if test -n "$OBJDUMP"; then
44126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44127 $as_echo "$OBJDUMP" >&6; }
44128 else
44129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44130 $as_echo "no" >&6; }
44131 fi
44132 
44133 
44134     test -n "$OBJDUMP" && break
44135   done
44136 fi
44137 if test -z "$OBJDUMP"; then
44138   ac_ct_OBJDUMP=$OBJDUMP
44139   for ac_prog in gobjdump objdump
44140 do
44141   # Extract the first word of "$ac_prog", so it can be a program name with args.
44142 set dummy $ac_prog; ac_word=$2
44143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44144 $as_echo_n "checking for $ac_word... " >&6; }
44145 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44146   $as_echo_n "(cached) " >&6
44147 else
44148   if test -n "$ac_ct_OBJDUMP"; then
44149   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44150 else
44151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44152 for as_dir in $PATH
44153 do
44154   IFS=$as_save_IFS
44155   test -z "$as_dir" && as_dir=.
44156     for ac_exec_ext in '' $ac_executable_extensions; do
44157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44158     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44160     break 2
44161   fi
44162 done
44163   done
44164 IFS=$as_save_IFS
44165 
44166 fi
44167 fi
44168 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44169 if test -n "$ac_ct_OBJDUMP"; then
44170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44171 $as_echo "$ac_ct_OBJDUMP" >&6; }
44172 else
44173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44174 $as_echo "no" >&6; }
44175 fi
44176 
44177 
44178   test -n "$ac_ct_OBJDUMP" && break
44179 done
44180 
44181   if test "x$ac_ct_OBJDUMP" = x; then
44182     OBJDUMP=""
44183   else
44184     case $cross_compiling:$ac_tool_warned in
44185 yes:)
44186 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44187 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44188 ac_tool_warned=yes ;;
44189 esac
44190     OBJDUMP=$ac_ct_OBJDUMP
44191   fi
44192 fi
44193 
44194   else
44195     # The variable is set, but is it from the command line or the environment?
44196 
44197     # Try to remove the string !OBJDUMP! from our list.
44198     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44199     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44200       # If it failed, the variable was not from the command line. Ignore it,
44201       # but warn the user (except for BASH, which is always set by the calling BASH).
44202       if test "xOBJDUMP" != xBASH; then
44203         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44204 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44205       fi
44206       # Try to locate tool using the code snippet
44207       if test -n "$ac_tool_prefix"; then
44208   for ac_prog in gobjdump objdump
44209   do
44210     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44211 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44213 $as_echo_n "checking for $ac_word... " >&6; }
44214 if ${ac_cv_prog_OBJDUMP+:} false; then :
44215   $as_echo_n "(cached) " >&6
44216 else
44217   if test -n "$OBJDUMP"; then
44218   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44219 else
44220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44221 for as_dir in $PATH
44222 do
44223   IFS=$as_save_IFS
44224   test -z "$as_dir" && as_dir=.
44225     for ac_exec_ext in '' $ac_executable_extensions; do
44226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44227     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44229     break 2
44230   fi
44231 done
44232   done
44233 IFS=$as_save_IFS
44234 
44235 fi
44236 fi
44237 OBJDUMP=$ac_cv_prog_OBJDUMP
44238 if test -n "$OBJDUMP"; then
44239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44240 $as_echo "$OBJDUMP" >&6; }
44241 else
44242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44243 $as_echo "no" >&6; }
44244 fi
44245 
44246 
44247     test -n "$OBJDUMP" && break
44248   done
44249 fi
44250 if test -z "$OBJDUMP"; then
44251   ac_ct_OBJDUMP=$OBJDUMP
44252   for ac_prog in gobjdump objdump
44253 do
44254   # Extract the first word of "$ac_prog", so it can be a program name with args.
44255 set dummy $ac_prog; ac_word=$2
44256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44257 $as_echo_n "checking for $ac_word... " >&6; }
44258 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44259   $as_echo_n "(cached) " >&6
44260 else
44261   if test -n "$ac_ct_OBJDUMP"; then
44262   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44263 else
44264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44265 for as_dir in $PATH
44266 do
44267   IFS=$as_save_IFS
44268   test -z "$as_dir" && as_dir=.
44269     for ac_exec_ext in '' $ac_executable_extensions; do
44270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44271     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44273     break 2
44274   fi
44275 done
44276   done
44277 IFS=$as_save_IFS
44278 
44279 fi
44280 fi
44281 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44282 if test -n "$ac_ct_OBJDUMP"; then
44283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44284 $as_echo "$ac_ct_OBJDUMP" >&6; }
44285 else
44286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44287 $as_echo "no" >&6; }
44288 fi
44289 
44290 
44291   test -n "$ac_ct_OBJDUMP" && break
44292 done
44293 
44294   if test "x$ac_ct_OBJDUMP" = x; then
44295     OBJDUMP=""
44296   else
44297     case $cross_compiling:$ac_tool_warned in
44298 yes:)
44299 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44300 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44301 ac_tool_warned=yes ;;
44302 esac
44303     OBJDUMP=$ac_ct_OBJDUMP
44304   fi
44305 fi
44306 
44307     else
44308       # If it succeeded, then it was overridden by the user. We will use it
44309       # for the tool.
44310 
44311       # First remove it from the list of overridden variables, so we can test
44312       # for unknown variables in the end.
44313       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44314 
44315       # Check if we try to supply an empty value
44316       if test "x$OBJDUMP" = x; then
44317         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44318 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44319         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44320 $as_echo_n "checking for OBJDUMP... " >&6; }
44321         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44322 $as_echo "disabled" >&6; }
44323       else
44324         # Check if the provided tool contains a complete path.
44325         tool_specified="$OBJDUMP"
44326         tool_basename="${tool_specified##*/}"
44327         if test "x$tool_basename" = "x$tool_specified"; then
44328           # A command without a complete path is provided, search $PATH.
44329           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44330 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44331           # Extract the first word of "$tool_basename", so it can be a program name with args.
44332 set dummy $tool_basename; ac_word=$2
44333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44334 $as_echo_n "checking for $ac_word... " >&6; }
44335 if ${ac_cv_path_OBJDUMP+:} false; then :
44336   $as_echo_n "(cached) " >&6
44337 else
44338   case $OBJDUMP in
44339   [\\/]* | ?:[\\/]*)
44340   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44341   ;;
44342   *)
44343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44344 for as_dir in $PATH
44345 do
44346   IFS=$as_save_IFS
44347   test -z "$as_dir" && as_dir=.
44348     for ac_exec_ext in '' $ac_executable_extensions; do
44349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44350     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44352     break 2
44353   fi
44354 done
44355   done
44356 IFS=$as_save_IFS
44357 
44358   ;;
44359 esac
44360 fi
44361 OBJDUMP=$ac_cv_path_OBJDUMP
44362 if test -n "$OBJDUMP"; then
44363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44364 $as_echo "$OBJDUMP" >&6; }
44365 else
44366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44367 $as_echo "no" >&6; }
44368 fi
44369 
44370 
44371           if test "x$OBJDUMP" = x; then
44372             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44373           fi
44374         else
44375           # Otherwise we believe it is a complete path. Use it as it is.
44376           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44377 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44378           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44379 $as_echo_n "checking for OBJDUMP... " >&6; }
44380           if test ! -x "$tool_specified"; then
44381             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44382 $as_echo "not found" >&6; }
44383             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44384           fi
44385           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44386 $as_echo "$tool_specified" >&6; }
44387         fi
44388       fi
44389     fi
44390 
44391   fi
44392 
44393 
44394   if test "x$OBJDUMP" != x; then
44395     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44396     # bails if argument is missing.
44397 
44398   # Only process if variable expands to non-empty
44399 
44400   if test "x$OBJDUMP" != x; then
44401     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44402 
44403   # First separate the path from the arguments. This will split at the first
44404   # space.
44405   complete="$OBJDUMP"
44406   path="${complete%% *}"
44407   tmp="$complete EOL"
44408   arguments="${tmp#* }"
44409 
44410   # Input might be given as Windows format, start by converting to
44411   # unix format.
44412   new_path=`$CYGPATH -u "$path"`
44413 
44414   # Now try to locate executable using which
44415   new_path=`$WHICH "$new_path" 2> /dev/null`
44416   # bat and cmd files are not always considered executable in cygwin causing which
44417   # to not find them
44418   if test "x$new_path" = x \
44419       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44420       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44421     new_path=`$CYGPATH -u "$path"`
44422   fi
44423   if test "x$new_path" = x; then
44424     # Oops. Which didn't find the executable.
44425     # The splitting of arguments from the executable at a space might have been incorrect,
44426     # since paths with space are more likely in Windows. Give it another try with the whole
44427     # argument.
44428     path="$complete"
44429     arguments="EOL"
44430     new_path=`$CYGPATH -u "$path"`
44431     new_path=`$WHICH "$new_path" 2> /dev/null`
44432     # bat and cmd files are not always considered executable in cygwin causing which
44433     # to not find them
44434     if test "x$new_path" = x \
44435         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44436         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44437       new_path=`$CYGPATH -u "$path"`
44438     fi
44439     if test "x$new_path" = x; then
44440       # It's still not found. Now this is an unrecoverable error.
44441       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44442 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44443       has_space=`$ECHO "$complete" | $GREP " "`
44444       if test "x$has_space" != x; then
44445         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44446 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44447       fi
44448       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44449     fi
44450   fi
44451 
44452   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44453   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44454   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44455   # "foo.exe" is OK but "foo" is an error.
44456   #
44457   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44458   # It is also a way to make sure we got the proper file name for the real test later on.
44459   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44460   if test "x$test_shortpath" = x; then
44461     # Short path failed, file does not exist as specified.
44462     # Try adding .exe or .cmd
44463     if test -f "${new_path}.exe"; then
44464       input_to_shortpath="${new_path}.exe"
44465     elif test -f "${new_path}.cmd"; then
44466       input_to_shortpath="${new_path}.cmd"
44467     else
44468       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44469 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44470       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44471 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44472       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44473     fi
44474   else
44475     input_to_shortpath="$new_path"
44476   fi
44477 
44478   # Call helper function which possibly converts this using DOS-style short mode.
44479   # If so, the updated path is stored in $new_path.
44480   new_path="$input_to_shortpath"
44481 
44482   input_path="$input_to_shortpath"
44483   # Check if we need to convert this using DOS-style short mode. If the path
44484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44485   # take no chances and rewrite it.
44486   # Note: m4 eats our [], so we need to use [ and ] instead.
44487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44488   if test "x$has_forbidden_chars" != x; then
44489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44490     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44491     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44492     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44493       # Going to short mode and back again did indeed matter. Since short mode is
44494       # case insensitive, let's make it lowercase to improve readability.
44495       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44496       # Now convert it back to Unix-style (cygpath)
44497       input_path=`$CYGPATH -u "$shortmode_path"`
44498       new_path="$input_path"
44499     fi
44500   fi
44501 
44502   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44503   if test "x$test_cygdrive_prefix" = x; then
44504     # As a simple fix, exclude /usr/bin since it's not a real path.
44505     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44506       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44507       # a path prefixed by /cygdrive for fixpath to work.
44508       new_path="$CYGWIN_ROOT_PATH$input_path"
44509     fi
44510   fi
44511 
44512   # remove trailing .exe if any
44513   new_path="${new_path/%.exe/}"
44514 
44515     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44516 
44517   # First separate the path from the arguments. This will split at the first
44518   # space.
44519   complete="$OBJDUMP"
44520   path="${complete%% *}"
44521   tmp="$complete EOL"
44522   arguments="${tmp#* }"
44523 
44524   # Input might be given as Windows format, start by converting to
44525   # unix format.
44526   new_path="$path"
44527 
44528   windows_path="$new_path"
44529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44530     unix_path=`$CYGPATH -u "$windows_path"`
44531     new_path="$unix_path"
44532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44534     new_path="$unix_path"
44535   fi
44536 
44537 
44538   # Now try to locate executable using which
44539   new_path=`$WHICH "$new_path" 2> /dev/null`
44540 
44541   if test "x$new_path" = x; then
44542     # Oops. Which didn't find the executable.
44543     # The splitting of arguments from the executable at a space might have been incorrect,
44544     # since paths with space are more likely in Windows. Give it another try with the whole
44545     # argument.
44546     path="$complete"
44547     arguments="EOL"
44548     new_path="$path"
44549 
44550   windows_path="$new_path"
44551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44552     unix_path=`$CYGPATH -u "$windows_path"`
44553     new_path="$unix_path"
44554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44556     new_path="$unix_path"
44557   fi
44558 
44559 
44560     new_path=`$WHICH "$new_path" 2> /dev/null`
44561     # bat and cmd files are not always considered executable in MSYS causing which
44562     # to not find them
44563     if test "x$new_path" = x \
44564         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44565         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44566       new_path="$path"
44567 
44568   windows_path="$new_path"
44569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44570     unix_path=`$CYGPATH -u "$windows_path"`
44571     new_path="$unix_path"
44572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44573     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44574     new_path="$unix_path"
44575   fi
44576 
44577     fi
44578 
44579     if test "x$new_path" = x; then
44580       # It's still not found. Now this is an unrecoverable error.
44581       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44582 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44583       has_space=`$ECHO "$complete" | $GREP " "`
44584       if test "x$has_space" != x; then
44585         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44586 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44587       fi
44588       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44589     fi
44590   fi
44591 
44592   # Now new_path has a complete unix path to the binary
44593   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44594     # Keep paths in /bin as-is, but remove trailing .exe if any
44595     new_path="${new_path/%.exe/}"
44596     # Do not save /bin paths to all_fixpath_prefixes!
44597   else
44598     # Not in mixed or Windows style, start by that.
44599     new_path=`cmd //c echo $new_path`
44600 
44601   input_path="$new_path"
44602   # Check if we need to convert this using DOS-style short mode. If the path
44603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44604   # take no chances and rewrite it.
44605   # Note: m4 eats our [], so we need to use [ and ] instead.
44606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44607   if test "x$has_forbidden_chars" != x; then
44608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44609     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44610   fi
44611 
44612     # Output is in $new_path
44613 
44614   windows_path="$new_path"
44615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44616     unix_path=`$CYGPATH -u "$windows_path"`
44617     new_path="$unix_path"
44618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44620     new_path="$unix_path"
44621   fi
44622 
44623     # remove trailing .exe if any
44624     new_path="${new_path/%.exe/}"
44625 
44626     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44627     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44628   fi
44629 
44630     else
44631       # We're on a unix platform. Hooray! :)
44632       # First separate the path from the arguments. This will split at the first
44633       # space.
44634       complete="$OBJDUMP"
44635       path="${complete%% *}"
44636       tmp="$complete EOL"
44637       arguments="${tmp#* }"
44638 
44639       # Cannot rely on the command "which" here since it doesn't always work.
44640       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44641       if test -z "$is_absolute_path"; then
44642         # Path to executable is not absolute. Find it.
44643         IFS_save="$IFS"
44644         IFS=:
44645         for p in $PATH; do
44646           if test -f "$p/$path" && test -x "$p/$path"; then
44647             new_path="$p/$path"
44648             break
44649           fi
44650         done
44651         IFS="$IFS_save"
44652       else
44653         # This is an absolute path, we can use it without further modifications.
44654         new_path="$path"
44655       fi
44656 
44657       if test "x$new_path" = x; then
44658         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44659 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44660         has_space=`$ECHO "$complete" | $GREP " "`
44661         if test "x$has_space" != x; then
44662           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44663 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44664         fi
44665         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44666       fi
44667     fi
44668 
44669     # Now join together the path and the arguments once again
44670     if test "x$arguments" != xEOL; then
44671       new_complete="$new_path ${arguments% *}"
44672     else
44673       new_complete="$new_path"
44674     fi
44675 
44676     if test "x$complete" != "x$new_complete"; then
44677       OBJDUMP="$new_complete"
44678       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44679 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44680     fi
44681   fi
44682 
44683   fi
44684 
44685 
44686   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44687   # to remain in place. Otherwise the compiler will not work in some siutations
44688   # in later configure checks.
44689   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44690     PATH="$OLD_PATH"
44691   fi
44692 
44693   # Restore the flags to the user specified values.
44694   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44695   CFLAGS="$ORG_CFLAGS"
44696   CXXFLAGS="$ORG_CXXFLAGS"
44697 
44698 
44699 # Finally do some processing after the detection phase
44700 
44701   if test "x$COMPILE_TYPE" = "xcross"; then
44702     # Now we need to find a C/C++ compiler that can build executables for the
44703     # build platform. We can't use the AC_PROG_CC macro, since it can only be
44704     # used once. Also, we need to do this without adding a tools dir to the
44705     # path, otherwise we might pick up cross-compilers which don't use standard
44706     # naming.
44707 
44708     OLDPATH="$PATH"
44709 
44710 
44711 # Check whether --with-build-devkit was given.
44712 if test "${with_build_devkit+set}" = set; then :
44713   withval=$with_build_devkit;
44714 fi
44715 
44716     if test "x$with_build_devkit" = "xyes"; then
44717       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44718     elif test -n "$with_build_devkit"; then
44719       if test ! -d "$with_build_devkit"; then
44720         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44721       else
44722 
44723   # Only process if variable expands to non-empty
44724 
44725   if test "x$with_build_devkit" != x; then
44726     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44727 
44728   # Input might be given as Windows format, start by converting to
44729   # unix format.
44730   path="$with_build_devkit"
44731   new_path=`$CYGPATH -u "$path"`
44732 
44733   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44734   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44735   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44736   # "foo.exe" is OK but "foo" is an error.
44737   #
44738   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44739   # It is also a way to make sure we got the proper file name for the real test later on.
44740   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44741   if test "x$test_shortpath" = x; then
44742     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44743 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44744     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44745   fi
44746 
44747   # Call helper function which possibly converts this using DOS-style short mode.
44748   # If so, the updated path is stored in $new_path.
44749 
44750   input_path="$new_path"
44751   # Check if we need to convert this using DOS-style short mode. If the path
44752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44753   # take no chances and rewrite it.
44754   # Note: m4 eats our [], so we need to use [ and ] instead.
44755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44756   if test "x$has_forbidden_chars" != x; then
44757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44758     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44759     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44760     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44761       # Going to short mode and back again did indeed matter. Since short mode is
44762       # case insensitive, let's make it lowercase to improve readability.
44763       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44764       # Now convert it back to Unix-style (cygpath)
44765       input_path=`$CYGPATH -u "$shortmode_path"`
44766       new_path="$input_path"
44767     fi
44768   fi
44769 
44770   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44771   if test "x$test_cygdrive_prefix" = x; then
44772     # As a simple fix, exclude /usr/bin since it's not a real path.
44773     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44774       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44775       # a path prefixed by /cygdrive for fixpath to work.
44776       new_path="$CYGWIN_ROOT_PATH$input_path"
44777     fi
44778   fi
44779 
44780 
44781   if test "x$path" != "x$new_path"; then
44782     with_build_devkit="$new_path"
44783     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44784 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44785   fi
44786 
44787     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44788 
44789   path="$with_build_devkit"
44790   has_colon=`$ECHO $path | $GREP ^.:`
44791   new_path="$path"
44792   if test "x$has_colon" = x; then
44793     # Not in mixed or Windows style, start by that.
44794     new_path=`cmd //c echo $path`
44795   fi
44796 
44797 
44798   input_path="$new_path"
44799   # Check if we need to convert this using DOS-style short mode. If the path
44800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44801   # take no chances and rewrite it.
44802   # Note: m4 eats our [], so we need to use [ and ] instead.
44803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44804   if test "x$has_forbidden_chars" != x; then
44805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44806     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44807   fi
44808 
44809 
44810   windows_path="$new_path"
44811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44812     unix_path=`$CYGPATH -u "$windows_path"`
44813     new_path="$unix_path"
44814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44815     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44816     new_path="$unix_path"
44817   fi
44818 
44819   if test "x$path" != "x$new_path"; then
44820     with_build_devkit="$new_path"
44821     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44822 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44823   fi
44824 
44825   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44826   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44827 
44828     else
44829       # We're on a unix platform. Hooray! :)
44830       path="$with_build_devkit"
44831       has_space=`$ECHO "$path" | $GREP " "`
44832       if test "x$has_space" != x; then
44833         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44834 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44835         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44836       fi
44837 
44838       # Use eval to expand a potential ~
44839       eval path="$path"
44840       if test ! -f "$path" && test ! -d "$path"; then
44841         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44842       fi
44843 
44844       if test -d "$path"; then
44845         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44846       else
44847         dir="`$DIRNAME "$path"`"
44848         base="`$BASENAME "$path"`"
44849         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44850       fi
44851     fi
44852   fi
44853 
44854         BUILD_DEVKIT_ROOT="$with_build_devkit"
44855         # Check for a meta data info file in the root of the devkit
44856         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44857           # Process devkit.info so that existing devkit variables are not
44858           # modified by this
44859           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44860               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44861               -e "s/\$host/\$build/g" \
44862               $BUILD_DEVKIT_ROOT/devkit.info \
44863               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44864           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44865           # This potentially sets the following:
44866           # A descriptive name of the devkit
44867 
44868   if test "x$BUILD_DEVKIT_NAME" = x; then
44869     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44870   fi
44871 
44872           # Corresponds to --with-extra-path
44873 
44874   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44875     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44876   fi
44877 
44878           # Corresponds to --with-toolchain-path
44879 
44880   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44881     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44882   fi
44883 
44884           # Corresponds to --with-sysroot
44885 
44886   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44887     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44888   fi
44889 
44890           # Skip the Window specific parts
44891         fi
44892 
44893         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44894 $as_echo_n "checking for build platform devkit... " >&6; }
44895         if test "x$BUILD_DEVKIT_NAME" != x; then
44896           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44897 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44898         else
44899           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44900 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44901         fi
44902 
44903         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44904 
44905   if test "x$BUILD_SYSROOT" != "x"; then
44906     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44907       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44908         # Solaris Studio does not have a concept of sysroot. Instead we must
44909         # make sure the default include and lib dirs are appended to each
44910         # compile and link command line. Must also add -I-xbuiltin to enable
44911         # inlining of system functions and intrinsics.
44912         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44913         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44914             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44915       fi
44916     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44917       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44918       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44919     elif test "x$TOOLCHAIN_TYPE" = xclang; then
44920       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44921       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44922     fi
44923     # The global CFLAGS and LDFLAGS variables need these for configure to function
44924     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44925     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44926     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44927     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44928   fi
44929 
44930   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44931     # We also need -iframework<path>/System/Library/Frameworks
44932     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44933     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44934     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44935     # set this here so it doesn't have to be peppered throughout the forest
44936     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44937     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44938   fi
44939 
44940 
44941 
44942 
44943 
44944          # Fallback default of just /bin if DEVKIT_PATH is not defined
44945         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44946           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44947         fi
44948         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44949       fi
44950     fi
44951 
44952     # FIXME: we should list the discovered compilers as an exclude pattern!
44953     # If we do that, we can do this detection before POST_DETECTION, and still
44954     # find the build compilers in the tools dir, if needed.
44955 
44956 
44957 
44958   # Publish this variable in the help.
44959 
44960 
44961   if [ -z "${BUILD_CC+x}" ]; then
44962     # The variable is not set by user, try to locate tool using the code snippet
44963     for ac_prog in cl cc gcc
44964 do
44965   # Extract the first word of "$ac_prog", so it can be a program name with args.
44966 set dummy $ac_prog; ac_word=$2
44967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44968 $as_echo_n "checking for $ac_word... " >&6; }
44969 if ${ac_cv_path_BUILD_CC+:} false; then :
44970   $as_echo_n "(cached) " >&6
44971 else
44972   case $BUILD_CC in
44973   [\\/]* | ?:[\\/]*)
44974   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44975   ;;
44976   *)
44977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44978 for as_dir in $PATH
44979 do
44980   IFS=$as_save_IFS
44981   test -z "$as_dir" && as_dir=.
44982     for ac_exec_ext in '' $ac_executable_extensions; do
44983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44984     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44986     break 2
44987   fi
44988 done
44989   done
44990 IFS=$as_save_IFS
44991 
44992   ;;
44993 esac
44994 fi
44995 BUILD_CC=$ac_cv_path_BUILD_CC
44996 if test -n "$BUILD_CC"; then
44997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44998 $as_echo "$BUILD_CC" >&6; }
44999 else
45000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45001 $as_echo "no" >&6; }
45002 fi
45003 
45004 
45005   test -n "$BUILD_CC" && break
45006 done
45007 
45008   else
45009     # The variable is set, but is it from the command line or the environment?
45010 
45011     # Try to remove the string !BUILD_CC! from our list.
45012     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45013     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45014       # If it failed, the variable was not from the command line. Ignore it,
45015       # but warn the user (except for BASH, which is always set by the calling BASH).
45016       if test "xBUILD_CC" != xBASH; then
45017         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45018 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45019       fi
45020       # Try to locate tool using the code snippet
45021       for ac_prog in cl cc gcc
45022 do
45023   # Extract the first word of "$ac_prog", so it can be a program name with args.
45024 set dummy $ac_prog; ac_word=$2
45025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45026 $as_echo_n "checking for $ac_word... " >&6; }
45027 if ${ac_cv_path_BUILD_CC+:} false; then :
45028   $as_echo_n "(cached) " >&6
45029 else
45030   case $BUILD_CC in
45031   [\\/]* | ?:[\\/]*)
45032   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45033   ;;
45034   *)
45035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45036 for as_dir in $PATH
45037 do
45038   IFS=$as_save_IFS
45039   test -z "$as_dir" && as_dir=.
45040     for ac_exec_ext in '' $ac_executable_extensions; do
45041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45042     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45044     break 2
45045   fi
45046 done
45047   done
45048 IFS=$as_save_IFS
45049 
45050   ;;
45051 esac
45052 fi
45053 BUILD_CC=$ac_cv_path_BUILD_CC
45054 if test -n "$BUILD_CC"; then
45055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45056 $as_echo "$BUILD_CC" >&6; }
45057 else
45058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45059 $as_echo "no" >&6; }
45060 fi
45061 
45062 
45063   test -n "$BUILD_CC" && break
45064 done
45065 
45066     else
45067       # If it succeeded, then it was overridden by the user. We will use it
45068       # for the tool.
45069 
45070       # First remove it from the list of overridden variables, so we can test
45071       # for unknown variables in the end.
45072       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45073 
45074       # Check if we try to supply an empty value
45075       if test "x$BUILD_CC" = x; then
45076         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45077 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45079 $as_echo_n "checking for BUILD_CC... " >&6; }
45080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45081 $as_echo "disabled" >&6; }
45082       else
45083         # Check if the provided tool contains a complete path.
45084         tool_specified="$BUILD_CC"
45085         tool_basename="${tool_specified##*/}"
45086         if test "x$tool_basename" = "x$tool_specified"; then
45087           # A command without a complete path is provided, search $PATH.
45088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45089 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45090           # Extract the first word of "$tool_basename", so it can be a program name with args.
45091 set dummy $tool_basename; ac_word=$2
45092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45093 $as_echo_n "checking for $ac_word... " >&6; }
45094 if ${ac_cv_path_BUILD_CC+:} false; then :
45095   $as_echo_n "(cached) " >&6
45096 else
45097   case $BUILD_CC in
45098   [\\/]* | ?:[\\/]*)
45099   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45100   ;;
45101   *)
45102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45103 for as_dir in $PATH
45104 do
45105   IFS=$as_save_IFS
45106   test -z "$as_dir" && as_dir=.
45107     for ac_exec_ext in '' $ac_executable_extensions; do
45108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45109     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45111     break 2
45112   fi
45113 done
45114   done
45115 IFS=$as_save_IFS
45116 
45117   ;;
45118 esac
45119 fi
45120 BUILD_CC=$ac_cv_path_BUILD_CC
45121 if test -n "$BUILD_CC"; then
45122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45123 $as_echo "$BUILD_CC" >&6; }
45124 else
45125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45126 $as_echo "no" >&6; }
45127 fi
45128 
45129 
45130           if test "x$BUILD_CC" = x; then
45131             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45132           fi
45133         else
45134           # Otherwise we believe it is a complete path. Use it as it is.
45135           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45136 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45137           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45138 $as_echo_n "checking for BUILD_CC... " >&6; }
45139           if test ! -x "$tool_specified"; then
45140             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45141 $as_echo "not found" >&6; }
45142             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45143           fi
45144           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45145 $as_echo "$tool_specified" >&6; }
45146         fi
45147       fi
45148     fi
45149 
45150   fi
45151 
45152 
45153 
45154   if test "x$BUILD_CC" = x; then
45155     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45156   fi
45157 
45158 
45159 
45160   # Only process if variable expands to non-empty
45161 
45162   if test "x$BUILD_CC" != x; then
45163     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45164 
45165   # First separate the path from the arguments. This will split at the first
45166   # space.
45167   complete="$BUILD_CC"
45168   path="${complete%% *}"
45169   tmp="$complete EOL"
45170   arguments="${tmp#* }"
45171 
45172   # Input might be given as Windows format, start by converting to
45173   # unix format.
45174   new_path=`$CYGPATH -u "$path"`
45175 
45176   # Now try to locate executable using which
45177   new_path=`$WHICH "$new_path" 2> /dev/null`
45178   # bat and cmd files are not always considered executable in cygwin causing which
45179   # to not find them
45180   if test "x$new_path" = x \
45181       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45182       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45183     new_path=`$CYGPATH -u "$path"`
45184   fi
45185   if test "x$new_path" = x; then
45186     # Oops. Which didn't find the executable.
45187     # The splitting of arguments from the executable at a space might have been incorrect,
45188     # since paths with space are more likely in Windows. Give it another try with the whole
45189     # argument.
45190     path="$complete"
45191     arguments="EOL"
45192     new_path=`$CYGPATH -u "$path"`
45193     new_path=`$WHICH "$new_path" 2> /dev/null`
45194     # bat and cmd files are not always considered executable in cygwin causing which
45195     # to not find them
45196     if test "x$new_path" = x \
45197         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45198         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45199       new_path=`$CYGPATH -u "$path"`
45200     fi
45201     if test "x$new_path" = x; then
45202       # It's still not found. Now this is an unrecoverable error.
45203       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45204 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45205       has_space=`$ECHO "$complete" | $GREP " "`
45206       if test "x$has_space" != x; then
45207         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45208 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45209       fi
45210       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45211     fi
45212   fi
45213 
45214   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45215   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45216   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45217   # "foo.exe" is OK but "foo" is an error.
45218   #
45219   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45220   # It is also a way to make sure we got the proper file name for the real test later on.
45221   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45222   if test "x$test_shortpath" = x; then
45223     # Short path failed, file does not exist as specified.
45224     # Try adding .exe or .cmd
45225     if test -f "${new_path}.exe"; then
45226       input_to_shortpath="${new_path}.exe"
45227     elif test -f "${new_path}.cmd"; then
45228       input_to_shortpath="${new_path}.cmd"
45229     else
45230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45231 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45232       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45233 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45234       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45235     fi
45236   else
45237     input_to_shortpath="$new_path"
45238   fi
45239 
45240   # Call helper function which possibly converts this using DOS-style short mode.
45241   # If so, the updated path is stored in $new_path.
45242   new_path="$input_to_shortpath"
45243 
45244   input_path="$input_to_shortpath"
45245   # Check if we need to convert this using DOS-style short mode. If the path
45246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45247   # take no chances and rewrite it.
45248   # Note: m4 eats our [], so we need to use [ and ] instead.
45249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45250   if test "x$has_forbidden_chars" != x; then
45251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45252     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45253     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45254     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45255       # Going to short mode and back again did indeed matter. Since short mode is
45256       # case insensitive, let's make it lowercase to improve readability.
45257       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45258       # Now convert it back to Unix-style (cygpath)
45259       input_path=`$CYGPATH -u "$shortmode_path"`
45260       new_path="$input_path"
45261     fi
45262   fi
45263 
45264   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45265   if test "x$test_cygdrive_prefix" = x; then
45266     # As a simple fix, exclude /usr/bin since it's not a real path.
45267     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45268       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45269       # a path prefixed by /cygdrive for fixpath to work.
45270       new_path="$CYGWIN_ROOT_PATH$input_path"
45271     fi
45272   fi
45273 
45274   # remove trailing .exe if any
45275   new_path="${new_path/%.exe/}"
45276 
45277     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45278 
45279   # First separate the path from the arguments. This will split at the first
45280   # space.
45281   complete="$BUILD_CC"
45282   path="${complete%% *}"
45283   tmp="$complete EOL"
45284   arguments="${tmp#* }"
45285 
45286   # Input might be given as Windows format, start by converting to
45287   # unix format.
45288   new_path="$path"
45289 
45290   windows_path="$new_path"
45291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45292     unix_path=`$CYGPATH -u "$windows_path"`
45293     new_path="$unix_path"
45294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45296     new_path="$unix_path"
45297   fi
45298 
45299 
45300   # Now try to locate executable using which
45301   new_path=`$WHICH "$new_path" 2> /dev/null`
45302 
45303   if test "x$new_path" = x; then
45304     # Oops. Which didn't find the executable.
45305     # The splitting of arguments from the executable at a space might have been incorrect,
45306     # since paths with space are more likely in Windows. Give it another try with the whole
45307     # argument.
45308     path="$complete"
45309     arguments="EOL"
45310     new_path="$path"
45311 
45312   windows_path="$new_path"
45313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45314     unix_path=`$CYGPATH -u "$windows_path"`
45315     new_path="$unix_path"
45316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45318     new_path="$unix_path"
45319   fi
45320 
45321 
45322     new_path=`$WHICH "$new_path" 2> /dev/null`
45323     # bat and cmd files are not always considered executable in MSYS causing which
45324     # to not find them
45325     if test "x$new_path" = x \
45326         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45327         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45328       new_path="$path"
45329 
45330   windows_path="$new_path"
45331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45332     unix_path=`$CYGPATH -u "$windows_path"`
45333     new_path="$unix_path"
45334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45336     new_path="$unix_path"
45337   fi
45338 
45339     fi
45340 
45341     if test "x$new_path" = x; then
45342       # It's still not found. Now this is an unrecoverable error.
45343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45344 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45345       has_space=`$ECHO "$complete" | $GREP " "`
45346       if test "x$has_space" != x; then
45347         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45348 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45349       fi
45350       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45351     fi
45352   fi
45353 
45354   # Now new_path has a complete unix path to the binary
45355   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45356     # Keep paths in /bin as-is, but remove trailing .exe if any
45357     new_path="${new_path/%.exe/}"
45358     # Do not save /bin paths to all_fixpath_prefixes!
45359   else
45360     # Not in mixed or Windows style, start by that.
45361     new_path=`cmd //c echo $new_path`
45362 
45363   input_path="$new_path"
45364   # Check if we need to convert this using DOS-style short mode. If the path
45365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45366   # take no chances and rewrite it.
45367   # Note: m4 eats our [], so we need to use [ and ] instead.
45368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45369   if test "x$has_forbidden_chars" != x; then
45370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45371     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45372   fi
45373 
45374     # Output is in $new_path
45375 
45376   windows_path="$new_path"
45377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45378     unix_path=`$CYGPATH -u "$windows_path"`
45379     new_path="$unix_path"
45380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45382     new_path="$unix_path"
45383   fi
45384 
45385     # remove trailing .exe if any
45386     new_path="${new_path/%.exe/}"
45387 
45388     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45389     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45390   fi
45391 
45392     else
45393       # We're on a unix platform. Hooray! :)
45394       # First separate the path from the arguments. This will split at the first
45395       # space.
45396       complete="$BUILD_CC"
45397       path="${complete%% *}"
45398       tmp="$complete EOL"
45399       arguments="${tmp#* }"
45400 
45401       # Cannot rely on the command "which" here since it doesn't always work.
45402       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45403       if test -z "$is_absolute_path"; then
45404         # Path to executable is not absolute. Find it.
45405         IFS_save="$IFS"
45406         IFS=:
45407         for p in $PATH; do
45408           if test -f "$p/$path" && test -x "$p/$path"; then
45409             new_path="$p/$path"
45410             break
45411           fi
45412         done
45413         IFS="$IFS_save"
45414       else
45415         # This is an absolute path, we can use it without further modifications.
45416         new_path="$path"
45417       fi
45418 
45419       if test "x$new_path" = x; then
45420         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45421 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45422         has_space=`$ECHO "$complete" | $GREP " "`
45423         if test "x$has_space" != x; then
45424           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45425 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45426         fi
45427         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45428       fi
45429     fi
45430 
45431     # Now join together the path and the arguments once again
45432     if test "x$arguments" != xEOL; then
45433       new_complete="$new_path ${arguments% *}"
45434     else
45435       new_complete="$new_path"
45436     fi
45437 
45438     if test "x$complete" != "x$new_complete"; then
45439       BUILD_CC="$new_complete"
45440       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45441 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45442     fi
45443   fi
45444 
45445 
45446 
45447 
45448   # Publish this variable in the help.
45449 
45450 
45451   if [ -z "${BUILD_CXX+x}" ]; then
45452     # The variable is not set by user, try to locate tool using the code snippet
45453     for ac_prog in cl CC g++
45454 do
45455   # Extract the first word of "$ac_prog", so it can be a program name with args.
45456 set dummy $ac_prog; ac_word=$2
45457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45458 $as_echo_n "checking for $ac_word... " >&6; }
45459 if ${ac_cv_path_BUILD_CXX+:} false; then :
45460   $as_echo_n "(cached) " >&6
45461 else
45462   case $BUILD_CXX in
45463   [\\/]* | ?:[\\/]*)
45464   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45465   ;;
45466   *)
45467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45468 for as_dir in $PATH
45469 do
45470   IFS=$as_save_IFS
45471   test -z "$as_dir" && as_dir=.
45472     for ac_exec_ext in '' $ac_executable_extensions; do
45473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45474     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45476     break 2
45477   fi
45478 done
45479   done
45480 IFS=$as_save_IFS
45481 
45482   ;;
45483 esac
45484 fi
45485 BUILD_CXX=$ac_cv_path_BUILD_CXX
45486 if test -n "$BUILD_CXX"; then
45487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45488 $as_echo "$BUILD_CXX" >&6; }
45489 else
45490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45491 $as_echo "no" >&6; }
45492 fi
45493 
45494 
45495   test -n "$BUILD_CXX" && break
45496 done
45497 
45498   else
45499     # The variable is set, but is it from the command line or the environment?
45500 
45501     # Try to remove the string !BUILD_CXX! from our list.
45502     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45503     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45504       # If it failed, the variable was not from the command line. Ignore it,
45505       # but warn the user (except for BASH, which is always set by the calling BASH).
45506       if test "xBUILD_CXX" != xBASH; then
45507         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45508 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45509       fi
45510       # Try to locate tool using the code snippet
45511       for ac_prog in cl CC g++
45512 do
45513   # Extract the first word of "$ac_prog", so it can be a program name with args.
45514 set dummy $ac_prog; ac_word=$2
45515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45516 $as_echo_n "checking for $ac_word... " >&6; }
45517 if ${ac_cv_path_BUILD_CXX+:} false; then :
45518   $as_echo_n "(cached) " >&6
45519 else
45520   case $BUILD_CXX in
45521   [\\/]* | ?:[\\/]*)
45522   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45523   ;;
45524   *)
45525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45526 for as_dir in $PATH
45527 do
45528   IFS=$as_save_IFS
45529   test -z "$as_dir" && as_dir=.
45530     for ac_exec_ext in '' $ac_executable_extensions; do
45531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45532     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45534     break 2
45535   fi
45536 done
45537   done
45538 IFS=$as_save_IFS
45539 
45540   ;;
45541 esac
45542 fi
45543 BUILD_CXX=$ac_cv_path_BUILD_CXX
45544 if test -n "$BUILD_CXX"; then
45545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45546 $as_echo "$BUILD_CXX" >&6; }
45547 else
45548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45549 $as_echo "no" >&6; }
45550 fi
45551 
45552 
45553   test -n "$BUILD_CXX" && break
45554 done
45555 
45556     else
45557       # If it succeeded, then it was overridden by the user. We will use it
45558       # for the tool.
45559 
45560       # First remove it from the list of overridden variables, so we can test
45561       # for unknown variables in the end.
45562       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45563 
45564       # Check if we try to supply an empty value
45565       if test "x$BUILD_CXX" = x; then
45566         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45567 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45568         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45569 $as_echo_n "checking for BUILD_CXX... " >&6; }
45570         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45571 $as_echo "disabled" >&6; }
45572       else
45573         # Check if the provided tool contains a complete path.
45574         tool_specified="$BUILD_CXX"
45575         tool_basename="${tool_specified##*/}"
45576         if test "x$tool_basename" = "x$tool_specified"; then
45577           # A command without a complete path is provided, search $PATH.
45578           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45579 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45580           # Extract the first word of "$tool_basename", so it can be a program name with args.
45581 set dummy $tool_basename; ac_word=$2
45582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45583 $as_echo_n "checking for $ac_word... " >&6; }
45584 if ${ac_cv_path_BUILD_CXX+:} false; then :
45585   $as_echo_n "(cached) " >&6
45586 else
45587   case $BUILD_CXX in
45588   [\\/]* | ?:[\\/]*)
45589   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45590   ;;
45591   *)
45592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45593 for as_dir in $PATH
45594 do
45595   IFS=$as_save_IFS
45596   test -z "$as_dir" && as_dir=.
45597     for ac_exec_ext in '' $ac_executable_extensions; do
45598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45599     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45601     break 2
45602   fi
45603 done
45604   done
45605 IFS=$as_save_IFS
45606 
45607   ;;
45608 esac
45609 fi
45610 BUILD_CXX=$ac_cv_path_BUILD_CXX
45611 if test -n "$BUILD_CXX"; then
45612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45613 $as_echo "$BUILD_CXX" >&6; }
45614 else
45615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45616 $as_echo "no" >&6; }
45617 fi
45618 
45619 
45620           if test "x$BUILD_CXX" = x; then
45621             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45622           fi
45623         else
45624           # Otherwise we believe it is a complete path. Use it as it is.
45625           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45626 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45627           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45628 $as_echo_n "checking for BUILD_CXX... " >&6; }
45629           if test ! -x "$tool_specified"; then
45630             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45631 $as_echo "not found" >&6; }
45632             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45633           fi
45634           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45635 $as_echo "$tool_specified" >&6; }
45636         fi
45637       fi
45638     fi
45639 
45640   fi
45641 
45642 
45643 
45644   if test "x$BUILD_CXX" = x; then
45645     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45646   fi
45647 
45648 
45649 
45650   # Only process if variable expands to non-empty
45651 
45652   if test "x$BUILD_CXX" != x; then
45653     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45654 
45655   # First separate the path from the arguments. This will split at the first
45656   # space.
45657   complete="$BUILD_CXX"
45658   path="${complete%% *}"
45659   tmp="$complete EOL"
45660   arguments="${tmp#* }"
45661 
45662   # Input might be given as Windows format, start by converting to
45663   # unix format.
45664   new_path=`$CYGPATH -u "$path"`
45665 
45666   # Now try to locate executable using which
45667   new_path=`$WHICH "$new_path" 2> /dev/null`
45668   # bat and cmd files are not always considered executable in cygwin causing which
45669   # to not find them
45670   if test "x$new_path" = x \
45671       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45672       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45673     new_path=`$CYGPATH -u "$path"`
45674   fi
45675   if test "x$new_path" = x; then
45676     # Oops. Which didn't find the executable.
45677     # The splitting of arguments from the executable at a space might have been incorrect,
45678     # since paths with space are more likely in Windows. Give it another try with the whole
45679     # argument.
45680     path="$complete"
45681     arguments="EOL"
45682     new_path=`$CYGPATH -u "$path"`
45683     new_path=`$WHICH "$new_path" 2> /dev/null`
45684     # bat and cmd files are not always considered executable in cygwin causing which
45685     # to not find them
45686     if test "x$new_path" = x \
45687         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45688         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45689       new_path=`$CYGPATH -u "$path"`
45690     fi
45691     if test "x$new_path" = x; then
45692       # It's still not found. Now this is an unrecoverable error.
45693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45694 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45695       has_space=`$ECHO "$complete" | $GREP " "`
45696       if test "x$has_space" != x; then
45697         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45698 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45699       fi
45700       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45701     fi
45702   fi
45703 
45704   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45705   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45706   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45707   # "foo.exe" is OK but "foo" is an error.
45708   #
45709   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45710   # It is also a way to make sure we got the proper file name for the real test later on.
45711   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45712   if test "x$test_shortpath" = x; then
45713     # Short path failed, file does not exist as specified.
45714     # Try adding .exe or .cmd
45715     if test -f "${new_path}.exe"; then
45716       input_to_shortpath="${new_path}.exe"
45717     elif test -f "${new_path}.cmd"; then
45718       input_to_shortpath="${new_path}.cmd"
45719     else
45720       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45721 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45722       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45723 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45724       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45725     fi
45726   else
45727     input_to_shortpath="$new_path"
45728   fi
45729 
45730   # Call helper function which possibly converts this using DOS-style short mode.
45731   # If so, the updated path is stored in $new_path.
45732   new_path="$input_to_shortpath"
45733 
45734   input_path="$input_to_shortpath"
45735   # Check if we need to convert this using DOS-style short mode. If the path
45736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45737   # take no chances and rewrite it.
45738   # Note: m4 eats our [], so we need to use [ and ] instead.
45739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45740   if test "x$has_forbidden_chars" != x; then
45741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45742     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45743     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45744     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45745       # Going to short mode and back again did indeed matter. Since short mode is
45746       # case insensitive, let's make it lowercase to improve readability.
45747       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45748       # Now convert it back to Unix-style (cygpath)
45749       input_path=`$CYGPATH -u "$shortmode_path"`
45750       new_path="$input_path"
45751     fi
45752   fi
45753 
45754   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45755   if test "x$test_cygdrive_prefix" = x; then
45756     # As a simple fix, exclude /usr/bin since it's not a real path.
45757     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45758       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45759       # a path prefixed by /cygdrive for fixpath to work.
45760       new_path="$CYGWIN_ROOT_PATH$input_path"
45761     fi
45762   fi
45763 
45764   # remove trailing .exe if any
45765   new_path="${new_path/%.exe/}"
45766 
45767     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45768 
45769   # First separate the path from the arguments. This will split at the first
45770   # space.
45771   complete="$BUILD_CXX"
45772   path="${complete%% *}"
45773   tmp="$complete EOL"
45774   arguments="${tmp#* }"
45775 
45776   # Input might be given as Windows format, start by converting to
45777   # unix format.
45778   new_path="$path"
45779 
45780   windows_path="$new_path"
45781   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45782     unix_path=`$CYGPATH -u "$windows_path"`
45783     new_path="$unix_path"
45784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45785     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45786     new_path="$unix_path"
45787   fi
45788 
45789 
45790   # Now try to locate executable using which
45791   new_path=`$WHICH "$new_path" 2> /dev/null`
45792 
45793   if test "x$new_path" = x; then
45794     # Oops. Which didn't find the executable.
45795     # The splitting of arguments from the executable at a space might have been incorrect,
45796     # since paths with space are more likely in Windows. Give it another try with the whole
45797     # argument.
45798     path="$complete"
45799     arguments="EOL"
45800     new_path="$path"
45801 
45802   windows_path="$new_path"
45803   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45804     unix_path=`$CYGPATH -u "$windows_path"`
45805     new_path="$unix_path"
45806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45807     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45808     new_path="$unix_path"
45809   fi
45810 
45811 
45812     new_path=`$WHICH "$new_path" 2> /dev/null`
45813     # bat and cmd files are not always considered executable in MSYS causing which
45814     # to not find them
45815     if test "x$new_path" = x \
45816         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45817         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45818       new_path="$path"
45819 
45820   windows_path="$new_path"
45821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45822     unix_path=`$CYGPATH -u "$windows_path"`
45823     new_path="$unix_path"
45824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45826     new_path="$unix_path"
45827   fi
45828 
45829     fi
45830 
45831     if test "x$new_path" = x; then
45832       # It's still not found. Now this is an unrecoverable error.
45833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45834 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45835       has_space=`$ECHO "$complete" | $GREP " "`
45836       if test "x$has_space" != x; then
45837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45839       fi
45840       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45841     fi
45842   fi
45843 
45844   # Now new_path has a complete unix path to the binary
45845   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45846     # Keep paths in /bin as-is, but remove trailing .exe if any
45847     new_path="${new_path/%.exe/}"
45848     # Do not save /bin paths to all_fixpath_prefixes!
45849   else
45850     # Not in mixed or Windows style, start by that.
45851     new_path=`cmd //c echo $new_path`
45852 
45853   input_path="$new_path"
45854   # Check if we need to convert this using DOS-style short mode. If the path
45855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45856   # take no chances and rewrite it.
45857   # Note: m4 eats our [], so we need to use [ and ] instead.
45858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45859   if test "x$has_forbidden_chars" != x; then
45860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45861     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45862   fi
45863 
45864     # Output is in $new_path
45865 
45866   windows_path="$new_path"
45867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45868     unix_path=`$CYGPATH -u "$windows_path"`
45869     new_path="$unix_path"
45870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45872     new_path="$unix_path"
45873   fi
45874 
45875     # remove trailing .exe if any
45876     new_path="${new_path/%.exe/}"
45877 
45878     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45879     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45880   fi
45881 
45882     else
45883       # We're on a unix platform. Hooray! :)
45884       # First separate the path from the arguments. This will split at the first
45885       # space.
45886       complete="$BUILD_CXX"
45887       path="${complete%% *}"
45888       tmp="$complete EOL"
45889       arguments="${tmp#* }"
45890 
45891       # Cannot rely on the command "which" here since it doesn't always work.
45892       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45893       if test -z "$is_absolute_path"; then
45894         # Path to executable is not absolute. Find it.
45895         IFS_save="$IFS"
45896         IFS=:
45897         for p in $PATH; do
45898           if test -f "$p/$path" && test -x "$p/$path"; then
45899             new_path="$p/$path"
45900             break
45901           fi
45902         done
45903         IFS="$IFS_save"
45904       else
45905         # This is an absolute path, we can use it without further modifications.
45906         new_path="$path"
45907       fi
45908 
45909       if test "x$new_path" = x; then
45910         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45911 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45912         has_space=`$ECHO "$complete" | $GREP " "`
45913         if test "x$has_space" != x; then
45914           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45915 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45916         fi
45917         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45918       fi
45919     fi
45920 
45921     # Now join together the path and the arguments once again
45922     if test "x$arguments" != xEOL; then
45923       new_complete="$new_path ${arguments% *}"
45924     else
45925       new_complete="$new_path"
45926     fi
45927 
45928     if test "x$complete" != "x$new_complete"; then
45929       BUILD_CXX="$new_complete"
45930       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45931 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45932     fi
45933   fi
45934 
45935 
45936 
45937   # Publish this variable in the help.
45938 
45939 
45940   if [ -z "${BUILD_NM+x}" ]; then
45941     # The variable is not set by user, try to locate tool using the code snippet
45942     for ac_prog in nm gcc-nm
45943 do
45944   # Extract the first word of "$ac_prog", so it can be a program name with args.
45945 set dummy $ac_prog; ac_word=$2
45946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45947 $as_echo_n "checking for $ac_word... " >&6; }
45948 if ${ac_cv_path_BUILD_NM+:} false; then :
45949   $as_echo_n "(cached) " >&6
45950 else
45951   case $BUILD_NM in
45952   [\\/]* | ?:[\\/]*)
45953   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45954   ;;
45955   *)
45956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45957 for as_dir in $PATH
45958 do
45959   IFS=$as_save_IFS
45960   test -z "$as_dir" && as_dir=.
45961     for ac_exec_ext in '' $ac_executable_extensions; do
45962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45963     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45965     break 2
45966   fi
45967 done
45968   done
45969 IFS=$as_save_IFS
45970 
45971   ;;
45972 esac
45973 fi
45974 BUILD_NM=$ac_cv_path_BUILD_NM
45975 if test -n "$BUILD_NM"; then
45976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45977 $as_echo "$BUILD_NM" >&6; }
45978 else
45979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45980 $as_echo "no" >&6; }
45981 fi
45982 
45983 
45984   test -n "$BUILD_NM" && break
45985 done
45986 
45987   else
45988     # The variable is set, but is it from the command line or the environment?
45989 
45990     # Try to remove the string !BUILD_NM! from our list.
45991     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45992     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45993       # If it failed, the variable was not from the command line. Ignore it,
45994       # but warn the user (except for BASH, which is always set by the calling BASH).
45995       if test "xBUILD_NM" != xBASH; then
45996         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45997 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45998       fi
45999       # Try to locate tool using the code snippet
46000       for ac_prog in nm gcc-nm
46001 do
46002   # Extract the first word of "$ac_prog", so it can be a program name with args.
46003 set dummy $ac_prog; ac_word=$2
46004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46005 $as_echo_n "checking for $ac_word... " >&6; }
46006 if ${ac_cv_path_BUILD_NM+:} false; then :
46007   $as_echo_n "(cached) " >&6
46008 else
46009   case $BUILD_NM in
46010   [\\/]* | ?:[\\/]*)
46011   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46012   ;;
46013   *)
46014   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46015 for as_dir in $PATH
46016 do
46017   IFS=$as_save_IFS
46018   test -z "$as_dir" && as_dir=.
46019     for ac_exec_ext in '' $ac_executable_extensions; do
46020   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46021     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46022     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46023     break 2
46024   fi
46025 done
46026   done
46027 IFS=$as_save_IFS
46028 
46029   ;;
46030 esac
46031 fi
46032 BUILD_NM=$ac_cv_path_BUILD_NM
46033 if test -n "$BUILD_NM"; then
46034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46035 $as_echo "$BUILD_NM" >&6; }
46036 else
46037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46038 $as_echo "no" >&6; }
46039 fi
46040 
46041 
46042   test -n "$BUILD_NM" && break
46043 done
46044 
46045     else
46046       # If it succeeded, then it was overridden by the user. We will use it
46047       # for the tool.
46048 
46049       # First remove it from the list of overridden variables, so we can test
46050       # for unknown variables in the end.
46051       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46052 
46053       # Check if we try to supply an empty value
46054       if test "x$BUILD_NM" = x; then
46055         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46056 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46057         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46058 $as_echo_n "checking for BUILD_NM... " >&6; }
46059         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46060 $as_echo "disabled" >&6; }
46061       else
46062         # Check if the provided tool contains a complete path.
46063         tool_specified="$BUILD_NM"
46064         tool_basename="${tool_specified##*/}"
46065         if test "x$tool_basename" = "x$tool_specified"; then
46066           # A command without a complete path is provided, search $PATH.
46067           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46068 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46069           # Extract the first word of "$tool_basename", so it can be a program name with args.
46070 set dummy $tool_basename; ac_word=$2
46071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46072 $as_echo_n "checking for $ac_word... " >&6; }
46073 if ${ac_cv_path_BUILD_NM+:} false; then :
46074   $as_echo_n "(cached) " >&6
46075 else
46076   case $BUILD_NM in
46077   [\\/]* | ?:[\\/]*)
46078   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46079   ;;
46080   *)
46081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46082 for as_dir in $PATH
46083 do
46084   IFS=$as_save_IFS
46085   test -z "$as_dir" && as_dir=.
46086     for ac_exec_ext in '' $ac_executable_extensions; do
46087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46088     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46090     break 2
46091   fi
46092 done
46093   done
46094 IFS=$as_save_IFS
46095 
46096   ;;
46097 esac
46098 fi
46099 BUILD_NM=$ac_cv_path_BUILD_NM
46100 if test -n "$BUILD_NM"; then
46101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46102 $as_echo "$BUILD_NM" >&6; }
46103 else
46104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46105 $as_echo "no" >&6; }
46106 fi
46107 
46108 
46109           if test "x$BUILD_NM" = x; then
46110             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46111           fi
46112         else
46113           # Otherwise we believe it is a complete path. Use it as it is.
46114           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46115 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46116           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46117 $as_echo_n "checking for BUILD_NM... " >&6; }
46118           if test ! -x "$tool_specified"; then
46119             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46120 $as_echo "not found" >&6; }
46121             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46122           fi
46123           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46124 $as_echo "$tool_specified" >&6; }
46125         fi
46126       fi
46127     fi
46128 
46129   fi
46130 
46131 
46132 
46133   # Only process if variable expands to non-empty
46134 
46135   if test "x$BUILD_NM" != x; then
46136     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46137 
46138   # First separate the path from the arguments. This will split at the first
46139   # space.
46140   complete="$BUILD_NM"
46141   path="${complete%% *}"
46142   tmp="$complete EOL"
46143   arguments="${tmp#* }"
46144 
46145   # Input might be given as Windows format, start by converting to
46146   # unix format.
46147   new_path=`$CYGPATH -u "$path"`
46148 
46149   # Now try to locate executable using which
46150   new_path=`$WHICH "$new_path" 2> /dev/null`
46151   # bat and cmd files are not always considered executable in cygwin causing which
46152   # to not find them
46153   if test "x$new_path" = x \
46154       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46155       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46156     new_path=`$CYGPATH -u "$path"`
46157   fi
46158   if test "x$new_path" = x; then
46159     # Oops. Which didn't find the executable.
46160     # The splitting of arguments from the executable at a space might have been incorrect,
46161     # since paths with space are more likely in Windows. Give it another try with the whole
46162     # argument.
46163     path="$complete"
46164     arguments="EOL"
46165     new_path=`$CYGPATH -u "$path"`
46166     new_path=`$WHICH "$new_path" 2> /dev/null`
46167     # bat and cmd files are not always considered executable in cygwin causing which
46168     # to not find them
46169     if test "x$new_path" = x \
46170         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46171         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46172       new_path=`$CYGPATH -u "$path"`
46173     fi
46174     if test "x$new_path" = x; then
46175       # It's still not found. Now this is an unrecoverable error.
46176       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46177 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46178       has_space=`$ECHO "$complete" | $GREP " "`
46179       if test "x$has_space" != x; then
46180         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46181 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46182       fi
46183       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46184     fi
46185   fi
46186 
46187   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46188   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46189   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46190   # "foo.exe" is OK but "foo" is an error.
46191   #
46192   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46193   # It is also a way to make sure we got the proper file name for the real test later on.
46194   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46195   if test "x$test_shortpath" = x; then
46196     # Short path failed, file does not exist as specified.
46197     # Try adding .exe or .cmd
46198     if test -f "${new_path}.exe"; then
46199       input_to_shortpath="${new_path}.exe"
46200     elif test -f "${new_path}.cmd"; then
46201       input_to_shortpath="${new_path}.cmd"
46202     else
46203       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46204 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46205       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46206 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46207       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46208     fi
46209   else
46210     input_to_shortpath="$new_path"
46211   fi
46212 
46213   # Call helper function which possibly converts this using DOS-style short mode.
46214   # If so, the updated path is stored in $new_path.
46215   new_path="$input_to_shortpath"
46216 
46217   input_path="$input_to_shortpath"
46218   # Check if we need to convert this using DOS-style short mode. If the path
46219   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46220   # take no chances and rewrite it.
46221   # Note: m4 eats our [], so we need to use [ and ] instead.
46222   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46223   if test "x$has_forbidden_chars" != x; then
46224     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46225     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46226     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46227     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46228       # Going to short mode and back again did indeed matter. Since short mode is
46229       # case insensitive, let's make it lowercase to improve readability.
46230       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46231       # Now convert it back to Unix-style (cygpath)
46232       input_path=`$CYGPATH -u "$shortmode_path"`
46233       new_path="$input_path"
46234     fi
46235   fi
46236 
46237   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46238   if test "x$test_cygdrive_prefix" = x; then
46239     # As a simple fix, exclude /usr/bin since it's not a real path.
46240     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46241       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46242       # a path prefixed by /cygdrive for fixpath to work.
46243       new_path="$CYGWIN_ROOT_PATH$input_path"
46244     fi
46245   fi
46246 
46247   # remove trailing .exe if any
46248   new_path="${new_path/%.exe/}"
46249 
46250     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46251 
46252   # First separate the path from the arguments. This will split at the first
46253   # space.
46254   complete="$BUILD_NM"
46255   path="${complete%% *}"
46256   tmp="$complete EOL"
46257   arguments="${tmp#* }"
46258 
46259   # Input might be given as Windows format, start by converting to
46260   # unix format.
46261   new_path="$path"
46262 
46263   windows_path="$new_path"
46264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46265     unix_path=`$CYGPATH -u "$windows_path"`
46266     new_path="$unix_path"
46267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46268     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46269     new_path="$unix_path"
46270   fi
46271 
46272 
46273   # Now try to locate executable using which
46274   new_path=`$WHICH "$new_path" 2> /dev/null`
46275 
46276   if test "x$new_path" = x; then
46277     # Oops. Which didn't find the executable.
46278     # The splitting of arguments from the executable at a space might have been incorrect,
46279     # since paths with space are more likely in Windows. Give it another try with the whole
46280     # argument.
46281     path="$complete"
46282     arguments="EOL"
46283     new_path="$path"
46284 
46285   windows_path="$new_path"
46286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46287     unix_path=`$CYGPATH -u "$windows_path"`
46288     new_path="$unix_path"
46289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46291     new_path="$unix_path"
46292   fi
46293 
46294 
46295     new_path=`$WHICH "$new_path" 2> /dev/null`
46296     # bat and cmd files are not always considered executable in MSYS causing which
46297     # to not find them
46298     if test "x$new_path" = x \
46299         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46300         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46301       new_path="$path"
46302 
46303   windows_path="$new_path"
46304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46305     unix_path=`$CYGPATH -u "$windows_path"`
46306     new_path="$unix_path"
46307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46308     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46309     new_path="$unix_path"
46310   fi
46311 
46312     fi
46313 
46314     if test "x$new_path" = x; then
46315       # It's still not found. Now this is an unrecoverable error.
46316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46317 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46318       has_space=`$ECHO "$complete" | $GREP " "`
46319       if test "x$has_space" != x; then
46320         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46321 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46322       fi
46323       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46324     fi
46325   fi
46326 
46327   # Now new_path has a complete unix path to the binary
46328   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46329     # Keep paths in /bin as-is, but remove trailing .exe if any
46330     new_path="${new_path/%.exe/}"
46331     # Do not save /bin paths to all_fixpath_prefixes!
46332   else
46333     # Not in mixed or Windows style, start by that.
46334     new_path=`cmd //c echo $new_path`
46335 
46336   input_path="$new_path"
46337   # Check if we need to convert this using DOS-style short mode. If the path
46338   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46339   # take no chances and rewrite it.
46340   # Note: m4 eats our [], so we need to use [ and ] instead.
46341   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46342   if test "x$has_forbidden_chars" != x; then
46343     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46344     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46345   fi
46346 
46347     # Output is in $new_path
46348 
46349   windows_path="$new_path"
46350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46351     unix_path=`$CYGPATH -u "$windows_path"`
46352     new_path="$unix_path"
46353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46355     new_path="$unix_path"
46356   fi
46357 
46358     # remove trailing .exe if any
46359     new_path="${new_path/%.exe/}"
46360 
46361     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46362     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46363   fi
46364 
46365     else
46366       # We're on a unix platform. Hooray! :)
46367       # First separate the path from the arguments. This will split at the first
46368       # space.
46369       complete="$BUILD_NM"
46370       path="${complete%% *}"
46371       tmp="$complete EOL"
46372       arguments="${tmp#* }"
46373 
46374       # Cannot rely on the command "which" here since it doesn't always work.
46375       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46376       if test -z "$is_absolute_path"; then
46377         # Path to executable is not absolute. Find it.
46378         IFS_save="$IFS"
46379         IFS=:
46380         for p in $PATH; do
46381           if test -f "$p/$path" && test -x "$p/$path"; then
46382             new_path="$p/$path"
46383             break
46384           fi
46385         done
46386         IFS="$IFS_save"
46387       else
46388         # This is an absolute path, we can use it without further modifications.
46389         new_path="$path"
46390       fi
46391 
46392       if test "x$new_path" = x; then
46393         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46394 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46395         has_space=`$ECHO "$complete" | $GREP " "`
46396         if test "x$has_space" != x; then
46397           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46398 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46399         fi
46400         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46401       fi
46402     fi
46403 
46404     # Now join together the path and the arguments once again
46405     if test "x$arguments" != xEOL; then
46406       new_complete="$new_path ${arguments% *}"
46407     else
46408       new_complete="$new_path"
46409     fi
46410 
46411     if test "x$complete" != "x$new_complete"; then
46412       BUILD_NM="$new_complete"
46413       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46414 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46415     fi
46416   fi
46417 
46418 
46419 
46420   # Publish this variable in the help.
46421 
46422 
46423   if [ -z "${BUILD_AR+x}" ]; then
46424     # The variable is not set by user, try to locate tool using the code snippet
46425     for ac_prog in ar gcc-ar
46426 do
46427   # Extract the first word of "$ac_prog", so it can be a program name with args.
46428 set dummy $ac_prog; ac_word=$2
46429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46430 $as_echo_n "checking for $ac_word... " >&6; }
46431 if ${ac_cv_path_BUILD_AR+:} false; then :
46432   $as_echo_n "(cached) " >&6
46433 else
46434   case $BUILD_AR in
46435   [\\/]* | ?:[\\/]*)
46436   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46437   ;;
46438   *)
46439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46440 for as_dir in $PATH
46441 do
46442   IFS=$as_save_IFS
46443   test -z "$as_dir" && as_dir=.
46444     for ac_exec_ext in '' $ac_executable_extensions; do
46445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46446     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46448     break 2
46449   fi
46450 done
46451   done
46452 IFS=$as_save_IFS
46453 
46454   ;;
46455 esac
46456 fi
46457 BUILD_AR=$ac_cv_path_BUILD_AR
46458 if test -n "$BUILD_AR"; then
46459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46460 $as_echo "$BUILD_AR" >&6; }
46461 else
46462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46463 $as_echo "no" >&6; }
46464 fi
46465 
46466 
46467   test -n "$BUILD_AR" && break
46468 done
46469 
46470   else
46471     # The variable is set, but is it from the command line or the environment?
46472 
46473     # Try to remove the string !BUILD_AR! from our list.
46474     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46475     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46476       # If it failed, the variable was not from the command line. Ignore it,
46477       # but warn the user (except for BASH, which is always set by the calling BASH).
46478       if test "xBUILD_AR" != xBASH; then
46479         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46480 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46481       fi
46482       # Try to locate tool using the code snippet
46483       for ac_prog in ar gcc-ar
46484 do
46485   # Extract the first word of "$ac_prog", so it can be a program name with args.
46486 set dummy $ac_prog; ac_word=$2
46487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46488 $as_echo_n "checking for $ac_word... " >&6; }
46489 if ${ac_cv_path_BUILD_AR+:} false; then :
46490   $as_echo_n "(cached) " >&6
46491 else
46492   case $BUILD_AR in
46493   [\\/]* | ?:[\\/]*)
46494   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46495   ;;
46496   *)
46497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46498 for as_dir in $PATH
46499 do
46500   IFS=$as_save_IFS
46501   test -z "$as_dir" && as_dir=.
46502     for ac_exec_ext in '' $ac_executable_extensions; do
46503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46504     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46506     break 2
46507   fi
46508 done
46509   done
46510 IFS=$as_save_IFS
46511 
46512   ;;
46513 esac
46514 fi
46515 BUILD_AR=$ac_cv_path_BUILD_AR
46516 if test -n "$BUILD_AR"; then
46517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46518 $as_echo "$BUILD_AR" >&6; }
46519 else
46520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46521 $as_echo "no" >&6; }
46522 fi
46523 
46524 
46525   test -n "$BUILD_AR" && break
46526 done
46527 
46528     else
46529       # If it succeeded, then it was overridden by the user. We will use it
46530       # for the tool.
46531 
46532       # First remove it from the list of overridden variables, so we can test
46533       # for unknown variables in the end.
46534       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46535 
46536       # Check if we try to supply an empty value
46537       if test "x$BUILD_AR" = x; then
46538         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46539 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46540         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46541 $as_echo_n "checking for BUILD_AR... " >&6; }
46542         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46543 $as_echo "disabled" >&6; }
46544       else
46545         # Check if the provided tool contains a complete path.
46546         tool_specified="$BUILD_AR"
46547         tool_basename="${tool_specified##*/}"
46548         if test "x$tool_basename" = "x$tool_specified"; then
46549           # A command without a complete path is provided, search $PATH.
46550           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46551 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46552           # Extract the first word of "$tool_basename", so it can be a program name with args.
46553 set dummy $tool_basename; ac_word=$2
46554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46555 $as_echo_n "checking for $ac_word... " >&6; }
46556 if ${ac_cv_path_BUILD_AR+:} false; then :
46557   $as_echo_n "(cached) " >&6
46558 else
46559   case $BUILD_AR in
46560   [\\/]* | ?:[\\/]*)
46561   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46562   ;;
46563   *)
46564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46565 for as_dir in $PATH
46566 do
46567   IFS=$as_save_IFS
46568   test -z "$as_dir" && as_dir=.
46569     for ac_exec_ext in '' $ac_executable_extensions; do
46570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46571     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46573     break 2
46574   fi
46575 done
46576   done
46577 IFS=$as_save_IFS
46578 
46579   ;;
46580 esac
46581 fi
46582 BUILD_AR=$ac_cv_path_BUILD_AR
46583 if test -n "$BUILD_AR"; then
46584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46585 $as_echo "$BUILD_AR" >&6; }
46586 else
46587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46588 $as_echo "no" >&6; }
46589 fi
46590 
46591 
46592           if test "x$BUILD_AR" = x; then
46593             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46594           fi
46595         else
46596           # Otherwise we believe it is a complete path. Use it as it is.
46597           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46598 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46599           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46600 $as_echo_n "checking for BUILD_AR... " >&6; }
46601           if test ! -x "$tool_specified"; then
46602             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46603 $as_echo "not found" >&6; }
46604             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46605           fi
46606           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46607 $as_echo "$tool_specified" >&6; }
46608         fi
46609       fi
46610     fi
46611 
46612   fi
46613 
46614 
46615 
46616   # Only process if variable expands to non-empty
46617 
46618   if test "x$BUILD_AR" != x; then
46619     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46620 
46621   # First separate the path from the arguments. This will split at the first
46622   # space.
46623   complete="$BUILD_AR"
46624   path="${complete%% *}"
46625   tmp="$complete EOL"
46626   arguments="${tmp#* }"
46627 
46628   # Input might be given as Windows format, start by converting to
46629   # unix format.
46630   new_path=`$CYGPATH -u "$path"`
46631 
46632   # Now try to locate executable using which
46633   new_path=`$WHICH "$new_path" 2> /dev/null`
46634   # bat and cmd files are not always considered executable in cygwin causing which
46635   # to not find them
46636   if test "x$new_path" = x \
46637       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46638       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46639     new_path=`$CYGPATH -u "$path"`
46640   fi
46641   if test "x$new_path" = x; then
46642     # Oops. Which didn't find the executable.
46643     # The splitting of arguments from the executable at a space might have been incorrect,
46644     # since paths with space are more likely in Windows. Give it another try with the whole
46645     # argument.
46646     path="$complete"
46647     arguments="EOL"
46648     new_path=`$CYGPATH -u "$path"`
46649     new_path=`$WHICH "$new_path" 2> /dev/null`
46650     # bat and cmd files are not always considered executable in cygwin causing which
46651     # to not find them
46652     if test "x$new_path" = x \
46653         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46654         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46655       new_path=`$CYGPATH -u "$path"`
46656     fi
46657     if test "x$new_path" = x; then
46658       # It's still not found. Now this is an unrecoverable error.
46659       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46660 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46661       has_space=`$ECHO "$complete" | $GREP " "`
46662       if test "x$has_space" != x; then
46663         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46664 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46665       fi
46666       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46667     fi
46668   fi
46669 
46670   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46671   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46672   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46673   # "foo.exe" is OK but "foo" is an error.
46674   #
46675   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46676   # It is also a way to make sure we got the proper file name for the real test later on.
46677   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46678   if test "x$test_shortpath" = x; then
46679     # Short path failed, file does not exist as specified.
46680     # Try adding .exe or .cmd
46681     if test -f "${new_path}.exe"; then
46682       input_to_shortpath="${new_path}.exe"
46683     elif test -f "${new_path}.cmd"; then
46684       input_to_shortpath="${new_path}.cmd"
46685     else
46686       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46687 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46688       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46689 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46690       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46691     fi
46692   else
46693     input_to_shortpath="$new_path"
46694   fi
46695 
46696   # Call helper function which possibly converts this using DOS-style short mode.
46697   # If so, the updated path is stored in $new_path.
46698   new_path="$input_to_shortpath"
46699 
46700   input_path="$input_to_shortpath"
46701   # Check if we need to convert this using DOS-style short mode. If the path
46702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46703   # take no chances and rewrite it.
46704   # Note: m4 eats our [], so we need to use [ and ] instead.
46705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46706   if test "x$has_forbidden_chars" != x; then
46707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46708     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46709     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46710     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46711       # Going to short mode and back again did indeed matter. Since short mode is
46712       # case insensitive, let's make it lowercase to improve readability.
46713       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46714       # Now convert it back to Unix-style (cygpath)
46715       input_path=`$CYGPATH -u "$shortmode_path"`
46716       new_path="$input_path"
46717     fi
46718   fi
46719 
46720   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46721   if test "x$test_cygdrive_prefix" = x; then
46722     # As a simple fix, exclude /usr/bin since it's not a real path.
46723     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46724       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46725       # a path prefixed by /cygdrive for fixpath to work.
46726       new_path="$CYGWIN_ROOT_PATH$input_path"
46727     fi
46728   fi
46729 
46730   # remove trailing .exe if any
46731   new_path="${new_path/%.exe/}"
46732 
46733     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46734 
46735   # First separate the path from the arguments. This will split at the first
46736   # space.
46737   complete="$BUILD_AR"
46738   path="${complete%% *}"
46739   tmp="$complete EOL"
46740   arguments="${tmp#* }"
46741 
46742   # Input might be given as Windows format, start by converting to
46743   # unix format.
46744   new_path="$path"
46745 
46746   windows_path="$new_path"
46747   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46748     unix_path=`$CYGPATH -u "$windows_path"`
46749     new_path="$unix_path"
46750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46751     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46752     new_path="$unix_path"
46753   fi
46754 
46755 
46756   # Now try to locate executable using which
46757   new_path=`$WHICH "$new_path" 2> /dev/null`
46758 
46759   if test "x$new_path" = x; then
46760     # Oops. Which didn't find the executable.
46761     # The splitting of arguments from the executable at a space might have been incorrect,
46762     # since paths with space are more likely in Windows. Give it another try with the whole
46763     # argument.
46764     path="$complete"
46765     arguments="EOL"
46766     new_path="$path"
46767 
46768   windows_path="$new_path"
46769   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46770     unix_path=`$CYGPATH -u "$windows_path"`
46771     new_path="$unix_path"
46772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46773     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46774     new_path="$unix_path"
46775   fi
46776 
46777 
46778     new_path=`$WHICH "$new_path" 2> /dev/null`
46779     # bat and cmd files are not always considered executable in MSYS causing which
46780     # to not find them
46781     if test "x$new_path" = x \
46782         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46783         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46784       new_path="$path"
46785 
46786   windows_path="$new_path"
46787   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46788     unix_path=`$CYGPATH -u "$windows_path"`
46789     new_path="$unix_path"
46790   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46791     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46792     new_path="$unix_path"
46793   fi
46794 
46795     fi
46796 
46797     if test "x$new_path" = x; then
46798       # It's still not found. Now this is an unrecoverable error.
46799       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46800 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46801       has_space=`$ECHO "$complete" | $GREP " "`
46802       if test "x$has_space" != x; then
46803         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46804 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46805       fi
46806       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46807     fi
46808   fi
46809 
46810   # Now new_path has a complete unix path to the binary
46811   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46812     # Keep paths in /bin as-is, but remove trailing .exe if any
46813     new_path="${new_path/%.exe/}"
46814     # Do not save /bin paths to all_fixpath_prefixes!
46815   else
46816     # Not in mixed or Windows style, start by that.
46817     new_path=`cmd //c echo $new_path`
46818 
46819   input_path="$new_path"
46820   # Check if we need to convert this using DOS-style short mode. If the path
46821   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46822   # take no chances and rewrite it.
46823   # Note: m4 eats our [], so we need to use [ and ] instead.
46824   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46825   if test "x$has_forbidden_chars" != x; then
46826     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46827     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46828   fi
46829 
46830     # Output is in $new_path
46831 
46832   windows_path="$new_path"
46833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46834     unix_path=`$CYGPATH -u "$windows_path"`
46835     new_path="$unix_path"
46836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46838     new_path="$unix_path"
46839   fi
46840 
46841     # remove trailing .exe if any
46842     new_path="${new_path/%.exe/}"
46843 
46844     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46845     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46846   fi
46847 
46848     else
46849       # We're on a unix platform. Hooray! :)
46850       # First separate the path from the arguments. This will split at the first
46851       # space.
46852       complete="$BUILD_AR"
46853       path="${complete%% *}"
46854       tmp="$complete EOL"
46855       arguments="${tmp#* }"
46856 
46857       # Cannot rely on the command "which" here since it doesn't always work.
46858       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46859       if test -z "$is_absolute_path"; then
46860         # Path to executable is not absolute. Find it.
46861         IFS_save="$IFS"
46862         IFS=:
46863         for p in $PATH; do
46864           if test -f "$p/$path" && test -x "$p/$path"; then
46865             new_path="$p/$path"
46866             break
46867           fi
46868         done
46869         IFS="$IFS_save"
46870       else
46871         # This is an absolute path, we can use it without further modifications.
46872         new_path="$path"
46873       fi
46874 
46875       if test "x$new_path" = x; then
46876         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46877 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46878         has_space=`$ECHO "$complete" | $GREP " "`
46879         if test "x$has_space" != x; then
46880           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46881 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46882         fi
46883         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46884       fi
46885     fi
46886 
46887     # Now join together the path and the arguments once again
46888     if test "x$arguments" != xEOL; then
46889       new_complete="$new_path ${arguments% *}"
46890     else
46891       new_complete="$new_path"
46892     fi
46893 
46894     if test "x$complete" != "x$new_complete"; then
46895       BUILD_AR="$new_complete"
46896       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46897 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46898     fi
46899   fi
46900 
46901 
46902 
46903   # Publish this variable in the help.
46904 
46905 
46906   if [ -z "${BUILD_OBJCOPY+x}" ]; then
46907     # The variable is not set by user, try to locate tool using the code snippet
46908     for ac_prog in objcopy
46909 do
46910   # Extract the first word of "$ac_prog", so it can be a program name with args.
46911 set dummy $ac_prog; ac_word=$2
46912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46913 $as_echo_n "checking for $ac_word... " >&6; }
46914 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46915   $as_echo_n "(cached) " >&6
46916 else
46917   case $BUILD_OBJCOPY in
46918   [\\/]* | ?:[\\/]*)
46919   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46920   ;;
46921   *)
46922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46923 for as_dir in $PATH
46924 do
46925   IFS=$as_save_IFS
46926   test -z "$as_dir" && as_dir=.
46927     for ac_exec_ext in '' $ac_executable_extensions; do
46928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46929     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46931     break 2
46932   fi
46933 done
46934   done
46935 IFS=$as_save_IFS
46936 
46937   ;;
46938 esac
46939 fi
46940 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46941 if test -n "$BUILD_OBJCOPY"; then
46942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46943 $as_echo "$BUILD_OBJCOPY" >&6; }
46944 else
46945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46946 $as_echo "no" >&6; }
46947 fi
46948 
46949 
46950   test -n "$BUILD_OBJCOPY" && break
46951 done
46952 
46953   else
46954     # The variable is set, but is it from the command line or the environment?
46955 
46956     # Try to remove the string !BUILD_OBJCOPY! from our list.
46957     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46958     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46959       # If it failed, the variable was not from the command line. Ignore it,
46960       # but warn the user (except for BASH, which is always set by the calling BASH).
46961       if test "xBUILD_OBJCOPY" != xBASH; then
46962         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46963 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46964       fi
46965       # Try to locate tool using the code snippet
46966       for ac_prog in objcopy
46967 do
46968   # Extract the first word of "$ac_prog", so it can be a program name with args.
46969 set dummy $ac_prog; ac_word=$2
46970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46971 $as_echo_n "checking for $ac_word... " >&6; }
46972 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46973   $as_echo_n "(cached) " >&6
46974 else
46975   case $BUILD_OBJCOPY in
46976   [\\/]* | ?:[\\/]*)
46977   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46978   ;;
46979   *)
46980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46981 for as_dir in $PATH
46982 do
46983   IFS=$as_save_IFS
46984   test -z "$as_dir" && as_dir=.
46985     for ac_exec_ext in '' $ac_executable_extensions; do
46986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46987     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46989     break 2
46990   fi
46991 done
46992   done
46993 IFS=$as_save_IFS
46994 
46995   ;;
46996 esac
46997 fi
46998 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46999 if test -n "$BUILD_OBJCOPY"; then
47000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47001 $as_echo "$BUILD_OBJCOPY" >&6; }
47002 else
47003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47004 $as_echo "no" >&6; }
47005 fi
47006 
47007 
47008   test -n "$BUILD_OBJCOPY" && break
47009 done
47010 
47011     else
47012       # If it succeeded, then it was overridden by the user. We will use it
47013       # for the tool.
47014 
47015       # First remove it from the list of overridden variables, so we can test
47016       # for unknown variables in the end.
47017       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47018 
47019       # Check if we try to supply an empty value
47020       if test "x$BUILD_OBJCOPY" = x; then
47021         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47022 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47023         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47024 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47025         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47026 $as_echo "disabled" >&6; }
47027       else
47028         # Check if the provided tool contains a complete path.
47029         tool_specified="$BUILD_OBJCOPY"
47030         tool_basename="${tool_specified##*/}"
47031         if test "x$tool_basename" = "x$tool_specified"; then
47032           # A command without a complete path is provided, search $PATH.
47033           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47034 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47035           # Extract the first word of "$tool_basename", so it can be a program name with args.
47036 set dummy $tool_basename; ac_word=$2
47037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47038 $as_echo_n "checking for $ac_word... " >&6; }
47039 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47040   $as_echo_n "(cached) " >&6
47041 else
47042   case $BUILD_OBJCOPY in
47043   [\\/]* | ?:[\\/]*)
47044   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47045   ;;
47046   *)
47047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47048 for as_dir in $PATH
47049 do
47050   IFS=$as_save_IFS
47051   test -z "$as_dir" && as_dir=.
47052     for ac_exec_ext in '' $ac_executable_extensions; do
47053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47054     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47056     break 2
47057   fi
47058 done
47059   done
47060 IFS=$as_save_IFS
47061 
47062   ;;
47063 esac
47064 fi
47065 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47066 if test -n "$BUILD_OBJCOPY"; then
47067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47068 $as_echo "$BUILD_OBJCOPY" >&6; }
47069 else
47070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47071 $as_echo "no" >&6; }
47072 fi
47073 
47074 
47075           if test "x$BUILD_OBJCOPY" = x; then
47076             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47077           fi
47078         else
47079           # Otherwise we believe it is a complete path. Use it as it is.
47080           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47081 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47082           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47083 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47084           if test ! -x "$tool_specified"; then
47085             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47086 $as_echo "not found" >&6; }
47087             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47088           fi
47089           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47090 $as_echo "$tool_specified" >&6; }
47091         fi
47092       fi
47093     fi
47094 
47095   fi
47096 
47097 
47098 
47099   # Only process if variable expands to non-empty
47100 
47101   if test "x$BUILD_OBJCOPY" != x; then
47102     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47103 
47104   # First separate the path from the arguments. This will split at the first
47105   # space.
47106   complete="$BUILD_OBJCOPY"
47107   path="${complete%% *}"
47108   tmp="$complete EOL"
47109   arguments="${tmp#* }"
47110 
47111   # Input might be given as Windows format, start by converting to
47112   # unix format.
47113   new_path=`$CYGPATH -u "$path"`
47114 
47115   # Now try to locate executable using which
47116   new_path=`$WHICH "$new_path" 2> /dev/null`
47117   # bat and cmd files are not always considered executable in cygwin causing which
47118   # to not find them
47119   if test "x$new_path" = x \
47120       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47121       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47122     new_path=`$CYGPATH -u "$path"`
47123   fi
47124   if test "x$new_path" = x; then
47125     # Oops. Which didn't find the executable.
47126     # The splitting of arguments from the executable at a space might have been incorrect,
47127     # since paths with space are more likely in Windows. Give it another try with the whole
47128     # argument.
47129     path="$complete"
47130     arguments="EOL"
47131     new_path=`$CYGPATH -u "$path"`
47132     new_path=`$WHICH "$new_path" 2> /dev/null`
47133     # bat and cmd files are not always considered executable in cygwin causing which
47134     # to not find them
47135     if test "x$new_path" = x \
47136         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47137         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47138       new_path=`$CYGPATH -u "$path"`
47139     fi
47140     if test "x$new_path" = x; then
47141       # It's still not found. Now this is an unrecoverable error.
47142       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47143 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47144       has_space=`$ECHO "$complete" | $GREP " "`
47145       if test "x$has_space" != x; then
47146         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47147 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47148       fi
47149       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47150     fi
47151   fi
47152 
47153   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47154   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47155   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47156   # "foo.exe" is OK but "foo" is an error.
47157   #
47158   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47159   # It is also a way to make sure we got the proper file name for the real test later on.
47160   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47161   if test "x$test_shortpath" = x; then
47162     # Short path failed, file does not exist as specified.
47163     # Try adding .exe or .cmd
47164     if test -f "${new_path}.exe"; then
47165       input_to_shortpath="${new_path}.exe"
47166     elif test -f "${new_path}.cmd"; then
47167       input_to_shortpath="${new_path}.cmd"
47168     else
47169       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47170 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47171       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47172 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47173       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47174     fi
47175   else
47176     input_to_shortpath="$new_path"
47177   fi
47178 
47179   # Call helper function which possibly converts this using DOS-style short mode.
47180   # If so, the updated path is stored in $new_path.
47181   new_path="$input_to_shortpath"
47182 
47183   input_path="$input_to_shortpath"
47184   # Check if we need to convert this using DOS-style short mode. If the path
47185   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47186   # take no chances and rewrite it.
47187   # Note: m4 eats our [], so we need to use [ and ] instead.
47188   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47189   if test "x$has_forbidden_chars" != x; then
47190     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47191     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47192     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47193     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47194       # Going to short mode and back again did indeed matter. Since short mode is
47195       # case insensitive, let's make it lowercase to improve readability.
47196       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47197       # Now convert it back to Unix-style (cygpath)
47198       input_path=`$CYGPATH -u "$shortmode_path"`
47199       new_path="$input_path"
47200     fi
47201   fi
47202 
47203   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47204   if test "x$test_cygdrive_prefix" = x; then
47205     # As a simple fix, exclude /usr/bin since it's not a real path.
47206     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47207       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47208       # a path prefixed by /cygdrive for fixpath to work.
47209       new_path="$CYGWIN_ROOT_PATH$input_path"
47210     fi
47211   fi
47212 
47213   # remove trailing .exe if any
47214   new_path="${new_path/%.exe/}"
47215 
47216     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47217 
47218   # First separate the path from the arguments. This will split at the first
47219   # space.
47220   complete="$BUILD_OBJCOPY"
47221   path="${complete%% *}"
47222   tmp="$complete EOL"
47223   arguments="${tmp#* }"
47224 
47225   # Input might be given as Windows format, start by converting to
47226   # unix format.
47227   new_path="$path"
47228 
47229   windows_path="$new_path"
47230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47231     unix_path=`$CYGPATH -u "$windows_path"`
47232     new_path="$unix_path"
47233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47234     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47235     new_path="$unix_path"
47236   fi
47237 
47238 
47239   # Now try to locate executable using which
47240   new_path=`$WHICH "$new_path" 2> /dev/null`
47241 
47242   if test "x$new_path" = x; then
47243     # Oops. Which didn't find the executable.
47244     # The splitting of arguments from the executable at a space might have been incorrect,
47245     # since paths with space are more likely in Windows. Give it another try with the whole
47246     # argument.
47247     path="$complete"
47248     arguments="EOL"
47249     new_path="$path"
47250 
47251   windows_path="$new_path"
47252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47253     unix_path=`$CYGPATH -u "$windows_path"`
47254     new_path="$unix_path"
47255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47257     new_path="$unix_path"
47258   fi
47259 
47260 
47261     new_path=`$WHICH "$new_path" 2> /dev/null`
47262     # bat and cmd files are not always considered executable in MSYS causing which
47263     # to not find them
47264     if test "x$new_path" = x \
47265         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47266         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47267       new_path="$path"
47268 
47269   windows_path="$new_path"
47270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47271     unix_path=`$CYGPATH -u "$windows_path"`
47272     new_path="$unix_path"
47273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47274     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47275     new_path="$unix_path"
47276   fi
47277 
47278     fi
47279 
47280     if test "x$new_path" = x; then
47281       # It's still not found. Now this is an unrecoverable error.
47282       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47283 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47284       has_space=`$ECHO "$complete" | $GREP " "`
47285       if test "x$has_space" != x; then
47286         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47287 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47288       fi
47289       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47290     fi
47291   fi
47292 
47293   # Now new_path has a complete unix path to the binary
47294   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47295     # Keep paths in /bin as-is, but remove trailing .exe if any
47296     new_path="${new_path/%.exe/}"
47297     # Do not save /bin paths to all_fixpath_prefixes!
47298   else
47299     # Not in mixed or Windows style, start by that.
47300     new_path=`cmd //c echo $new_path`
47301 
47302   input_path="$new_path"
47303   # Check if we need to convert this using DOS-style short mode. If the path
47304   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47305   # take no chances and rewrite it.
47306   # Note: m4 eats our [], so we need to use [ and ] instead.
47307   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47308   if test "x$has_forbidden_chars" != x; then
47309     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47310     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47311   fi
47312 
47313     # Output is in $new_path
47314 
47315   windows_path="$new_path"
47316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47317     unix_path=`$CYGPATH -u "$windows_path"`
47318     new_path="$unix_path"
47319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47320     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47321     new_path="$unix_path"
47322   fi
47323 
47324     # remove trailing .exe if any
47325     new_path="${new_path/%.exe/}"
47326 
47327     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47328     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47329   fi
47330 
47331     else
47332       # We're on a unix platform. Hooray! :)
47333       # First separate the path from the arguments. This will split at the first
47334       # space.
47335       complete="$BUILD_OBJCOPY"
47336       path="${complete%% *}"
47337       tmp="$complete EOL"
47338       arguments="${tmp#* }"
47339 
47340       # Cannot rely on the command "which" here since it doesn't always work.
47341       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47342       if test -z "$is_absolute_path"; then
47343         # Path to executable is not absolute. Find it.
47344         IFS_save="$IFS"
47345         IFS=:
47346         for p in $PATH; do
47347           if test -f "$p/$path" && test -x "$p/$path"; then
47348             new_path="$p/$path"
47349             break
47350           fi
47351         done
47352         IFS="$IFS_save"
47353       else
47354         # This is an absolute path, we can use it without further modifications.
47355         new_path="$path"
47356       fi
47357 
47358       if test "x$new_path" = x; then
47359         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47360 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47361         has_space=`$ECHO "$complete" | $GREP " "`
47362         if test "x$has_space" != x; then
47363           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47364 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47365         fi
47366         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47367       fi
47368     fi
47369 
47370     # Now join together the path and the arguments once again
47371     if test "x$arguments" != xEOL; then
47372       new_complete="$new_path ${arguments% *}"
47373     else
47374       new_complete="$new_path"
47375     fi
47376 
47377     if test "x$complete" != "x$new_complete"; then
47378       BUILD_OBJCOPY="$new_complete"
47379       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47380 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47381     fi
47382   fi
47383 
47384 
47385 
47386   # Publish this variable in the help.
47387 
47388 
47389   if [ -z "${BUILD_STRIP+x}" ]; then
47390     # The variable is not set by user, try to locate tool using the code snippet
47391     for ac_prog in strip
47392 do
47393   # Extract the first word of "$ac_prog", so it can be a program name with args.
47394 set dummy $ac_prog; ac_word=$2
47395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47396 $as_echo_n "checking for $ac_word... " >&6; }
47397 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47398   $as_echo_n "(cached) " >&6
47399 else
47400   case $BUILD_STRIP in
47401   [\\/]* | ?:[\\/]*)
47402   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47403   ;;
47404   *)
47405   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47406 for as_dir in $PATH
47407 do
47408   IFS=$as_save_IFS
47409   test -z "$as_dir" && as_dir=.
47410     for ac_exec_ext in '' $ac_executable_extensions; do
47411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47412     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47414     break 2
47415   fi
47416 done
47417   done
47418 IFS=$as_save_IFS
47419 
47420   ;;
47421 esac
47422 fi
47423 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47424 if test -n "$BUILD_STRIP"; then
47425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47426 $as_echo "$BUILD_STRIP" >&6; }
47427 else
47428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47429 $as_echo "no" >&6; }
47430 fi
47431 
47432 
47433   test -n "$BUILD_STRIP" && break
47434 done
47435 
47436   else
47437     # The variable is set, but is it from the command line or the environment?
47438 
47439     # Try to remove the string !BUILD_STRIP! from our list.
47440     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47441     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47442       # If it failed, the variable was not from the command line. Ignore it,
47443       # but warn the user (except for BASH, which is always set by the calling BASH).
47444       if test "xBUILD_STRIP" != xBASH; then
47445         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47446 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47447       fi
47448       # Try to locate tool using the code snippet
47449       for ac_prog in strip
47450 do
47451   # Extract the first word of "$ac_prog", so it can be a program name with args.
47452 set dummy $ac_prog; ac_word=$2
47453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47454 $as_echo_n "checking for $ac_word... " >&6; }
47455 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47456   $as_echo_n "(cached) " >&6
47457 else
47458   case $BUILD_STRIP in
47459   [\\/]* | ?:[\\/]*)
47460   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47461   ;;
47462   *)
47463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47464 for as_dir in $PATH
47465 do
47466   IFS=$as_save_IFS
47467   test -z "$as_dir" && as_dir=.
47468     for ac_exec_ext in '' $ac_executable_extensions; do
47469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47470     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47472     break 2
47473   fi
47474 done
47475   done
47476 IFS=$as_save_IFS
47477 
47478   ;;
47479 esac
47480 fi
47481 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47482 if test -n "$BUILD_STRIP"; then
47483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47484 $as_echo "$BUILD_STRIP" >&6; }
47485 else
47486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47487 $as_echo "no" >&6; }
47488 fi
47489 
47490 
47491   test -n "$BUILD_STRIP" && break
47492 done
47493 
47494     else
47495       # If it succeeded, then it was overridden by the user. We will use it
47496       # for the tool.
47497 
47498       # First remove it from the list of overridden variables, so we can test
47499       # for unknown variables in the end.
47500       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47501 
47502       # Check if we try to supply an empty value
47503       if test "x$BUILD_STRIP" = x; then
47504         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47505 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47506         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47507 $as_echo_n "checking for BUILD_STRIP... " >&6; }
47508         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47509 $as_echo "disabled" >&6; }
47510       else
47511         # Check if the provided tool contains a complete path.
47512         tool_specified="$BUILD_STRIP"
47513         tool_basename="${tool_specified##*/}"
47514         if test "x$tool_basename" = "x$tool_specified"; then
47515           # A command without a complete path is provided, search $PATH.
47516           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47517 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47518           # Extract the first word of "$tool_basename", so it can be a program name with args.
47519 set dummy $tool_basename; ac_word=$2
47520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47521 $as_echo_n "checking for $ac_word... " >&6; }
47522 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47523   $as_echo_n "(cached) " >&6
47524 else
47525   case $BUILD_STRIP in
47526   [\\/]* | ?:[\\/]*)
47527   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47528   ;;
47529   *)
47530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47531 for as_dir in $PATH
47532 do
47533   IFS=$as_save_IFS
47534   test -z "$as_dir" && as_dir=.
47535     for ac_exec_ext in '' $ac_executable_extensions; do
47536   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47537     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47539     break 2
47540   fi
47541 done
47542   done
47543 IFS=$as_save_IFS
47544 
47545   ;;
47546 esac
47547 fi
47548 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47549 if test -n "$BUILD_STRIP"; then
47550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47551 $as_echo "$BUILD_STRIP" >&6; }
47552 else
47553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47554 $as_echo "no" >&6; }
47555 fi
47556 
47557 
47558           if test "x$BUILD_STRIP" = x; then
47559             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47560           fi
47561         else
47562           # Otherwise we believe it is a complete path. Use it as it is.
47563           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47564 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47565           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47566 $as_echo_n "checking for BUILD_STRIP... " >&6; }
47567           if test ! -x "$tool_specified"; then
47568             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47569 $as_echo "not found" >&6; }
47570             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47571           fi
47572           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47573 $as_echo "$tool_specified" >&6; }
47574         fi
47575       fi
47576     fi
47577 
47578   fi
47579 
47580 
47581 
47582   # Only process if variable expands to non-empty
47583 
47584   if test "x$BUILD_STRIP" != x; then
47585     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47586 
47587   # First separate the path from the arguments. This will split at the first
47588   # space.
47589   complete="$BUILD_STRIP"
47590   path="${complete%% *}"
47591   tmp="$complete EOL"
47592   arguments="${tmp#* }"
47593 
47594   # Input might be given as Windows format, start by converting to
47595   # unix format.
47596   new_path=`$CYGPATH -u "$path"`
47597 
47598   # Now try to locate executable using which
47599   new_path=`$WHICH "$new_path" 2> /dev/null`
47600   # bat and cmd files are not always considered executable in cygwin causing which
47601   # to not find them
47602   if test "x$new_path" = x \
47603       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47604       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47605     new_path=`$CYGPATH -u "$path"`
47606   fi
47607   if test "x$new_path" = x; then
47608     # Oops. Which didn't find the executable.
47609     # The splitting of arguments from the executable at a space might have been incorrect,
47610     # since paths with space are more likely in Windows. Give it another try with the whole
47611     # argument.
47612     path="$complete"
47613     arguments="EOL"
47614     new_path=`$CYGPATH -u "$path"`
47615     new_path=`$WHICH "$new_path" 2> /dev/null`
47616     # bat and cmd files are not always considered executable in cygwin causing which
47617     # to not find them
47618     if test "x$new_path" = x \
47619         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47620         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47621       new_path=`$CYGPATH -u "$path"`
47622     fi
47623     if test "x$new_path" = x; then
47624       # It's still not found. Now this is an unrecoverable error.
47625       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47626 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47627       has_space=`$ECHO "$complete" | $GREP " "`
47628       if test "x$has_space" != x; then
47629         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47630 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47631       fi
47632       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47633     fi
47634   fi
47635 
47636   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47637   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47638   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47639   # "foo.exe" is OK but "foo" is an error.
47640   #
47641   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47642   # It is also a way to make sure we got the proper file name for the real test later on.
47643   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47644   if test "x$test_shortpath" = x; then
47645     # Short path failed, file does not exist as specified.
47646     # Try adding .exe or .cmd
47647     if test -f "${new_path}.exe"; then
47648       input_to_shortpath="${new_path}.exe"
47649     elif test -f "${new_path}.cmd"; then
47650       input_to_shortpath="${new_path}.cmd"
47651     else
47652       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47653 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47654       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47655 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47656       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47657     fi
47658   else
47659     input_to_shortpath="$new_path"
47660   fi
47661 
47662   # Call helper function which possibly converts this using DOS-style short mode.
47663   # If so, the updated path is stored in $new_path.
47664   new_path="$input_to_shortpath"
47665 
47666   input_path="$input_to_shortpath"
47667   # Check if we need to convert this using DOS-style short mode. If the path
47668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47669   # take no chances and rewrite it.
47670   # Note: m4 eats our [], so we need to use [ and ] instead.
47671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47672   if test "x$has_forbidden_chars" != x; then
47673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47674     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47675     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47676     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47677       # Going to short mode and back again did indeed matter. Since short mode is
47678       # case insensitive, let's make it lowercase to improve readability.
47679       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47680       # Now convert it back to Unix-style (cygpath)
47681       input_path=`$CYGPATH -u "$shortmode_path"`
47682       new_path="$input_path"
47683     fi
47684   fi
47685 
47686   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47687   if test "x$test_cygdrive_prefix" = x; then
47688     # As a simple fix, exclude /usr/bin since it's not a real path.
47689     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47690       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47691       # a path prefixed by /cygdrive for fixpath to work.
47692       new_path="$CYGWIN_ROOT_PATH$input_path"
47693     fi
47694   fi
47695 
47696   # remove trailing .exe if any
47697   new_path="${new_path/%.exe/}"
47698 
47699     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47700 
47701   # First separate the path from the arguments. This will split at the first
47702   # space.
47703   complete="$BUILD_STRIP"
47704   path="${complete%% *}"
47705   tmp="$complete EOL"
47706   arguments="${tmp#* }"
47707 
47708   # Input might be given as Windows format, start by converting to
47709   # unix format.
47710   new_path="$path"
47711 
47712   windows_path="$new_path"
47713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47714     unix_path=`$CYGPATH -u "$windows_path"`
47715     new_path="$unix_path"
47716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47718     new_path="$unix_path"
47719   fi
47720 
47721 
47722   # Now try to locate executable using which
47723   new_path=`$WHICH "$new_path" 2> /dev/null`
47724 
47725   if test "x$new_path" = x; then
47726     # Oops. Which didn't find the executable.
47727     # The splitting of arguments from the executable at a space might have been incorrect,
47728     # since paths with space are more likely in Windows. Give it another try with the whole
47729     # argument.
47730     path="$complete"
47731     arguments="EOL"
47732     new_path="$path"
47733 
47734   windows_path="$new_path"
47735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47736     unix_path=`$CYGPATH -u "$windows_path"`
47737     new_path="$unix_path"
47738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47740     new_path="$unix_path"
47741   fi
47742 
47743 
47744     new_path=`$WHICH "$new_path" 2> /dev/null`
47745     # bat and cmd files are not always considered executable in MSYS causing which
47746     # to not find them
47747     if test "x$new_path" = x \
47748         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47749         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47750       new_path="$path"
47751 
47752   windows_path="$new_path"
47753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47754     unix_path=`$CYGPATH -u "$windows_path"`
47755     new_path="$unix_path"
47756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47757     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47758     new_path="$unix_path"
47759   fi
47760 
47761     fi
47762 
47763     if test "x$new_path" = x; then
47764       # It's still not found. Now this is an unrecoverable error.
47765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47766 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47767       has_space=`$ECHO "$complete" | $GREP " "`
47768       if test "x$has_space" != x; then
47769         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47770 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47771       fi
47772       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47773     fi
47774   fi
47775 
47776   # Now new_path has a complete unix path to the binary
47777   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47778     # Keep paths in /bin as-is, but remove trailing .exe if any
47779     new_path="${new_path/%.exe/}"
47780     # Do not save /bin paths to all_fixpath_prefixes!
47781   else
47782     # Not in mixed or Windows style, start by that.
47783     new_path=`cmd //c echo $new_path`
47784 
47785   input_path="$new_path"
47786   # Check if we need to convert this using DOS-style short mode. If the path
47787   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47788   # take no chances and rewrite it.
47789   # Note: m4 eats our [], so we need to use [ and ] instead.
47790   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47791   if test "x$has_forbidden_chars" != x; then
47792     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47793     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47794   fi
47795 
47796     # Output is in $new_path
47797 
47798   windows_path="$new_path"
47799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47800     unix_path=`$CYGPATH -u "$windows_path"`
47801     new_path="$unix_path"
47802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47804     new_path="$unix_path"
47805   fi
47806 
47807     # remove trailing .exe if any
47808     new_path="${new_path/%.exe/}"
47809 
47810     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47811     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47812   fi
47813 
47814     else
47815       # We're on a unix platform. Hooray! :)
47816       # First separate the path from the arguments. This will split at the first
47817       # space.
47818       complete="$BUILD_STRIP"
47819       path="${complete%% *}"
47820       tmp="$complete EOL"
47821       arguments="${tmp#* }"
47822 
47823       # Cannot rely on the command "which" here since it doesn't always work.
47824       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47825       if test -z "$is_absolute_path"; then
47826         # Path to executable is not absolute. Find it.
47827         IFS_save="$IFS"
47828         IFS=:
47829         for p in $PATH; do
47830           if test -f "$p/$path" && test -x "$p/$path"; then
47831             new_path="$p/$path"
47832             break
47833           fi
47834         done
47835         IFS="$IFS_save"
47836       else
47837         # This is an absolute path, we can use it without further modifications.
47838         new_path="$path"
47839       fi
47840 
47841       if test "x$new_path" = x; then
47842         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47843 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47844         has_space=`$ECHO "$complete" | $GREP " "`
47845         if test "x$has_space" != x; then
47846           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47847 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47848         fi
47849         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47850       fi
47851     fi
47852 
47853     # Now join together the path and the arguments once again
47854     if test "x$arguments" != xEOL; then
47855       new_complete="$new_path ${arguments% *}"
47856     else
47857       new_complete="$new_path"
47858     fi
47859 
47860     if test "x$complete" != "x$new_complete"; then
47861       BUILD_STRIP="$new_complete"
47862       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47863 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47864     fi
47865   fi
47866 
47867     # Assume the C compiler is the assembler
47868     BUILD_AS="$BUILD_CC -c"
47869     # Just like for the target compiler, use the compiler as linker
47870     BUILD_LD="$BUILD_CC"
47871     BUILD_LDCXX="$BUILD_CXX"
47872 
47873     PATH="$OLDPATH"
47874 
47875 
47876   COMPILER=$BUILD_CC
47877   COMPILER_NAME=BuildC
47878 
47879   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47880     # cc -V output typically looks like
47881     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47882     # or
47883     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47884     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47885     # Check that this is likely to be the Solaris Studio cc.
47886     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47887     if test $? -ne 0; then
47888       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47889       { $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
47890 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47891       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47892 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47893       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47894 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47895       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47896     fi
47897     # Remove usage instructions (if present), and
47898     # collapse compiler output into a single line
47899     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47900         $SED -e 's/ *[Uu]sage:.*//'`
47901     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47902         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47903   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47904     # xlc -qversion output typically looks like
47905     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47906     #     Version: 11.01.0000.0015
47907     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47908     # Check that this is likely to be the IBM XL C compiler.
47909     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47910     if test $? -ne 0; then
47911       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47912       { $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
47913 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47914       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47915 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47916       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47917 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47918       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47919     fi
47920     # Collapse compiler output into a single line
47921     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47922     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47923         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47924   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47925     # There is no specific version flag, but all output starts with a version string.
47926     # First line typically looks something like:
47927     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47928     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47929     # Check that this is likely to be Microsoft CL.EXE.
47930     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47931     if test $? -ne 0; then
47932       { $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
47933 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47934       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47935 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47936       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47937     fi
47938     # Collapse compiler output into a single line
47939     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47940     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47941         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47942   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47943     # gcc --version output typically looks like
47944     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47945     #     Copyright (C) 2013 Free Software Foundation, Inc.
47946     #     This is free software; see the source for copying conditions.  There is NO
47947     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47948     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47949     # Check that this is likely to be GCC.
47950     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47951     if test $? -ne 0; then
47952       { $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
47953 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47954       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47955 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47956       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47957     fi
47958     # Remove Copyright and legalese from version string, and
47959     # collapse into a single line
47960     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47961         $SED -e 's/ *Copyright .*//'`
47962     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47963         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47964   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47965     # clang --version output typically looks like
47966     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47967     #    clang version 3.3 (tags/RELEASE_33/final)
47968     # or
47969     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47970     #    Target: x86_64-pc-linux-gnu
47971     #    Thread model: posix
47972     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47973     # Check that this is likely to be clang
47974     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47975     if test $? -ne 0; then
47976       { $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
47977 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47978       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47979 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47980       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47981     fi
47982     # Collapse compiler output into a single line
47983     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47984     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47985         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47986   else
47987       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47988   fi
47989   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47990   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47991   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47992   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47993 
47994   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47995 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47996 
47997 
47998   COMPILER=$BUILD_CXX
47999   COMPILER_NAME=BuildC++
48000 
48001   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48002     # cc -V output typically looks like
48003     #     cc: Sun C 5.12 Linux_i386 2011/11/16
48004     # or
48005     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48006     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48007     # Check that this is likely to be the Solaris Studio cc.
48008     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48009     if test $? -ne 0; then
48010       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48011       { $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
48012 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48013       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48014 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48015       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48016 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48017       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48018     fi
48019     # Remove usage instructions (if present), and
48020     # collapse compiler output into a single line
48021     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48022         $SED -e 's/ *[Uu]sage:.*//'`
48023     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48024         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48025   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48026     # xlc -qversion output typically looks like
48027     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48028     #     Version: 11.01.0000.0015
48029     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48030     # Check that this is likely to be the IBM XL C compiler.
48031     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48032     if test $? -ne 0; then
48033       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48034       { $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
48035 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48036       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48037 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48038       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48039 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48040       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48041     fi
48042     # Collapse compiler output into a single line
48043     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48044     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48045         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48046   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48047     # There is no specific version flag, but all output starts with a version string.
48048     # First line typically looks something like:
48049     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48050     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48051     # Check that this is likely to be Microsoft CL.EXE.
48052     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48053     if test $? -ne 0; then
48054       { $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
48055 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48056       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48057 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48058       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48059     fi
48060     # Collapse compiler output into a single line
48061     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48062     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48063         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48064   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48065     # gcc --version output typically looks like
48066     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48067     #     Copyright (C) 2013 Free Software Foundation, Inc.
48068     #     This is free software; see the source for copying conditions.  There is NO
48069     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48070     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48071     # Check that this is likely to be GCC.
48072     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48073     if test $? -ne 0; then
48074       { $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
48075 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48076       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48077 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48078       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48079     fi
48080     # Remove Copyright and legalese from version string, and
48081     # collapse into a single line
48082     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48083         $SED -e 's/ *Copyright .*//'`
48084     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48085         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48086   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48087     # clang --version output typically looks like
48088     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48089     #    clang version 3.3 (tags/RELEASE_33/final)
48090     # or
48091     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48092     #    Target: x86_64-pc-linux-gnu
48093     #    Thread model: posix
48094     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48095     # Check that this is likely to be clang
48096     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48097     if test $? -ne 0; then
48098       { $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
48099 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48100       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48101 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48102       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48103     fi
48104     # Collapse compiler output into a single line
48105     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48106     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48107         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48108   else
48109       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48110   fi
48111   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48112   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48113   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48114   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48115 
48116   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48117 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48118 
48119 
48120   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48121     { $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
48122 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48123     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48124 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48125   fi
48126 
48127   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48128   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48129     { $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
48130 $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;}
48131   fi
48132 
48133   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48134     { $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
48135 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48136   fi
48137 
48138   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48139 
48140   else
48141     # If we are not cross compiling, use the normal target compilers for
48142     # building the build platform executables.
48143     BUILD_CC="$CC"
48144     BUILD_CXX="$CXX"
48145     BUILD_LD="$LD"
48146     BUILD_LDCXX="$LDCXX"
48147     BUILD_NM="$NM"
48148     BUILD_AS="$AS"
48149     BUILD_OBJCOPY="$OBJCOPY"
48150     BUILD_STRIP="$STRIP"
48151     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48152     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48153     BUILD_AR="$AR"
48154 
48155 
48156   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48157     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48158 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48159     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48160 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48161   fi
48162 
48163   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48164   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48165     { $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
48166 $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;}
48167   fi
48168 
48169   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48170     { $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
48171 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48172   fi
48173 
48174   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48175 
48176   fi
48177 
48178 
48179 
48180 
48181 
48182 
48183 
48184 
48185 
48186 
48187 
48188 
48189 
48190 
48191   # The package path is used only on macosx?
48192   # FIXME: clean this up, and/or move it elsewhere.
48193   PACKAGE_PATH=/opt/local
48194 
48195 
48196   # Check for extra potential brokenness.
48197   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48198     # On Windows, double-check that we got the right compiler.
48199     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48200     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48201     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48202       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48203         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
48204       fi
48205     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48206       if test "x$COMPILER_CPU_TEST" != "xx64"; then
48207         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48208       fi
48209     fi
48210   fi
48211 
48212   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48213     # If this is a --hash-style=gnu system, use --hash-style=both, why?
48214     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48215     # This is later checked when setting flags.
48216 
48217     # "-Og" suppported for GCC 4.8 and later
48218     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48219 
48220 
48221 
48222 
48223 
48224 
48225 
48226 
48227 
48228 
48229 
48230 
48231 
48232 
48233 
48234 
48235 
48236 
48237 
48238 
48239 
48240 
48241 
48242 
48243 
48244 
48245 
48246 
48247 
48248 
48249 
48250 
48251 
48252 
48253 
48254 
48255 
48256 
48257 
48258 
48259 
48260 
48261 
48262 
48263 
48264 
48265 
48266     # Execute function body
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 
48292 
48293 
48294 
48295 
48296 
48297 
48298 
48299 
48300 
48301 
48302 
48303 
48304 
48305 
48306 
48307 
48308 
48309 
48310 
48311 
48312 
48313 
48314 
48315     # Execute function body
48316 
48317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48318 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48319   supports=yes
48320 
48321   saved_cflags="$CFLAGS"
48322   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48323   ac_ext=c
48324 ac_cpp='$CPP $CPPFLAGS'
48325 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48326 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48327 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48328 
48329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48330 /* end confdefs.h.  */
48331 int i;
48332 _ACEOF
48333 if ac_fn_c_try_compile "$LINENO"; then :
48334 
48335 else
48336   supports=no
48337 fi
48338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48339   ac_ext=cpp
48340 ac_cpp='$CXXCPP $CPPFLAGS'
48341 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48342 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48343 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48344 
48345   CFLAGS="$saved_cflags"
48346 
48347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48348 $as_echo "$supports" >&6; }
48349   if test "x$supports" = "xyes" ; then
48350     :
48351     C_COMP_SUPPORTS="yes"
48352   else
48353     :
48354     C_COMP_SUPPORTS="no"
48355   fi
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 
48403 
48404 
48405 
48406 
48407 
48408 
48409 
48410 
48411 
48412 
48413 
48414 
48415     # Execute function body
48416 
48417   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48418 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48419   supports=yes
48420 
48421   saved_cxxflags="$CXXFLAGS"
48422   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48423   ac_ext=cpp
48424 ac_cpp='$CXXCPP $CPPFLAGS'
48425 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48426 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48427 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48428 
48429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48430 /* end confdefs.h.  */
48431 int i;
48432 _ACEOF
48433 if ac_fn_cxx_try_compile "$LINENO"; then :
48434 
48435 else
48436   supports=no
48437 fi
48438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48439   ac_ext=cpp
48440 ac_cpp='$CXXCPP $CPPFLAGS'
48441 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48442 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48443 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48444 
48445   CXXFLAGS="$saved_cxxflags"
48446 
48447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48448 $as_echo "$supports" >&6; }
48449   if test "x$supports" = "xyes" ; then
48450     :
48451     CXX_COMP_SUPPORTS="yes"
48452   else
48453     :
48454     CXX_COMP_SUPPORTS="no"
48455   fi
48456 
48457 
48458 
48459 
48460 
48461 
48462 
48463 
48464 
48465 
48466 
48467 
48468 
48469   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48470 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48471   supports=no
48472   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48473 
48474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48475 $as_echo "$supports" >&6; }
48476   if test "x$supports" = "xyes" ; then
48477     :
48478     HAS_CFLAG_OPTIMIZE_DEBUG=true
48479   else
48480     :
48481     HAS_CFLAG_OPTIMIZE_DEBUG=false
48482   fi
48483 
48484 
48485 
48486 
48487 
48488 
48489 
48490     # "-z relro" supported in GNU binutils 2.17 and later
48491     LINKER_RELRO_FLAG="-Wl,-z,relro"
48492 
48493 
48494 
48495 
48496 
48497 
48498 
48499 
48500 
48501 
48502 
48503 
48504 
48505 
48506 
48507 
48508 
48509 
48510 
48511 
48512 
48513 
48514 
48515 
48516 
48517 
48518 
48519 
48520 
48521 
48522 
48523 
48524 
48525 
48526 
48527 
48528 
48529 
48530 
48531 
48532 
48533 
48534 
48535 
48536 
48537 
48538 
48539     # Execute function body
48540 
48541   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48542 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48543   supports=yes
48544 
48545   saved_ldflags="$LDFLAGS"
48546   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48547   ac_ext=c
48548 ac_cpp='$CPP $CPPFLAGS'
48549 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48550 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48551 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48552 
48553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48554 /* end confdefs.h.  */
48555 
48556 int
48557 main ()
48558 {
48559 
48560   ;
48561   return 0;
48562 }
48563 _ACEOF
48564 if ac_fn_c_try_link "$LINENO"; then :
48565 
48566 else
48567   supports=no
48568 fi
48569 rm -f core conftest.err conftest.$ac_objext \
48570     conftest$ac_exeext conftest.$ac_ext
48571   ac_ext=cpp
48572 ac_cpp='$CXXCPP $CPPFLAGS'
48573 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48574 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48575 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48576 
48577   LDFLAGS="$saved_ldflags"
48578 
48579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48580 $as_echo "$supports" >&6; }
48581   if test "x$supports" = "xyes" ; then
48582     :
48583     HAS_LINKER_RELRO=true
48584   else
48585     :
48586     HAS_LINKER_RELRO=false
48587   fi
48588 
48589 
48590 
48591 
48592 
48593 
48594 
48595 
48596 
48597 
48598 
48599 
48600 
48601     # "-z now" supported in GNU binutils 2.11 and later
48602     LINKER_NOW_FLAG="-Wl,-z,now"
48603 
48604 
48605 
48606 
48607 
48608 
48609 
48610 
48611 
48612 
48613 
48614 
48615 
48616 
48617 
48618 
48619 
48620 
48621 
48622 
48623 
48624 
48625 
48626 
48627 
48628 
48629 
48630 
48631 
48632 
48633 
48634 
48635 
48636 
48637 
48638 
48639 
48640 
48641 
48642 
48643 
48644 
48645 
48646 
48647 
48648 
48649 
48650     # Execute function body
48651 
48652   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48653 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48654   supports=yes
48655 
48656   saved_ldflags="$LDFLAGS"
48657   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48658   ac_ext=c
48659 ac_cpp='$CPP $CPPFLAGS'
48660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48663 
48664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48665 /* end confdefs.h.  */
48666 
48667 int
48668 main ()
48669 {
48670 
48671   ;
48672   return 0;
48673 }
48674 _ACEOF
48675 if ac_fn_c_try_link "$LINENO"; then :
48676 
48677 else
48678   supports=no
48679 fi
48680 rm -f core conftest.err conftest.$ac_objext \
48681     conftest$ac_exeext conftest.$ac_ext
48682   ac_ext=cpp
48683 ac_cpp='$CXXCPP $CPPFLAGS'
48684 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48685 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48686 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48687 
48688   LDFLAGS="$saved_ldflags"
48689 
48690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48691 $as_echo "$supports" >&6; }
48692   if test "x$supports" = "xyes" ; then
48693     :
48694     HAS_LINKER_NOW=true
48695   else
48696     :
48697     HAS_LINKER_NOW=false
48698   fi
48699 
48700 
48701 
48702 
48703 
48704 
48705 
48706 
48707 
48708 
48709 
48710 
48711   fi
48712 
48713   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48714   # in executable.'
48715   USING_BROKEN_SUSE_LD=no
48716   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48717     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48718 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48719     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48720     $ECHO "int main() { }" > main.c
48721     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48722       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48723 $as_echo "no" >&6; }
48724       USING_BROKEN_SUSE_LD=no
48725     else
48726       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48727 $as_echo "yes" >&6; }
48728       USING_BROKEN_SUSE_LD=yes
48729     fi
48730     $RM version-script.map main.c a.out
48731   fi
48732 
48733 
48734   # Setup hotspot lecagy names for toolchains
48735   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48736   if test "x$TOOLCHAIN_TYPE" = xclang; then
48737     HOTSPOT_TOOLCHAIN_TYPE=gcc
48738   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48739     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48740   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48741     HOTSPOT_TOOLCHAIN_TYPE=visCPP
48742   fi
48743 
48744 
48745 
48746 # Setup the JTReg Regression Test Harness.
48747 
48748 
48749 # Check whether --with-jtreg was given.
48750 if test "${with_jtreg+set}" = set; then :
48751   withval=$with_jtreg;
48752 fi
48753 
48754 
48755   if test "x$with_jtreg" = xno; then
48756     # jtreg disabled
48757     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48758 $as_echo_n "checking for jtreg test harness... " >&6; }
48759     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48760 $as_echo "no, disabled" >&6; }
48761   elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48762     # An explicit path is specified, use it.
48763     JT_HOME="$with_jtreg"
48764 
48765   # Only process if variable expands to non-empty
48766 
48767   if test "x$JT_HOME" != x; then
48768     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48769 
48770   # Input might be given as Windows format, start by converting to
48771   # unix format.
48772   path="$JT_HOME"
48773   new_path=`$CYGPATH -u "$path"`
48774 
48775   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48776   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48777   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48778   # "foo.exe" is OK but "foo" is an error.
48779   #
48780   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48781   # It is also a way to make sure we got the proper file name for the real test later on.
48782   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48783   if test "x$test_shortpath" = x; then
48784     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48785 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48786     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48787   fi
48788 
48789   # Call helper function which possibly converts this using DOS-style short mode.
48790   # If so, the updated path is stored in $new_path.
48791 
48792   input_path="$new_path"
48793   # Check if we need to convert this using DOS-style short mode. If the path
48794   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48795   # take no chances and rewrite it.
48796   # Note: m4 eats our [], so we need to use [ and ] instead.
48797   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48798   if test "x$has_forbidden_chars" != x; then
48799     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48800     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48801     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48802     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48803       # Going to short mode and back again did indeed matter. Since short mode is
48804       # case insensitive, let's make it lowercase to improve readability.
48805       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48806       # Now convert it back to Unix-style (cygpath)
48807       input_path=`$CYGPATH -u "$shortmode_path"`
48808       new_path="$input_path"
48809     fi
48810   fi
48811 
48812   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48813   if test "x$test_cygdrive_prefix" = x; then
48814     # As a simple fix, exclude /usr/bin since it's not a real path.
48815     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48816       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48817       # a path prefixed by /cygdrive for fixpath to work.
48818       new_path="$CYGWIN_ROOT_PATH$input_path"
48819     fi
48820   fi
48821 
48822 
48823   if test "x$path" != "x$new_path"; then
48824     JT_HOME="$new_path"
48825     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48826 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48827   fi
48828 
48829     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48830 
48831   path="$JT_HOME"
48832   has_colon=`$ECHO $path | $GREP ^.:`
48833   new_path="$path"
48834   if test "x$has_colon" = x; then
48835     # Not in mixed or Windows style, start by that.
48836     new_path=`cmd //c echo $path`
48837   fi
48838 
48839 
48840   input_path="$new_path"
48841   # Check if we need to convert this using DOS-style short mode. If the path
48842   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48843   # take no chances and rewrite it.
48844   # Note: m4 eats our [], so we need to use [ and ] instead.
48845   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48846   if test "x$has_forbidden_chars" != x; then
48847     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48848     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48849   fi
48850 
48851 
48852   windows_path="$new_path"
48853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48854     unix_path=`$CYGPATH -u "$windows_path"`
48855     new_path="$unix_path"
48856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48858     new_path="$unix_path"
48859   fi
48860 
48861   if test "x$path" != "x$new_path"; then
48862     JT_HOME="$new_path"
48863     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48864 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48865   fi
48866 
48867   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48868   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48869 
48870     else
48871       # We're on a unix platform. Hooray! :)
48872       path="$JT_HOME"
48873       has_space=`$ECHO "$path" | $GREP " "`
48874       if test "x$has_space" != x; then
48875         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48876 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48877         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48878       fi
48879 
48880       # Use eval to expand a potential ~
48881       eval path="$path"
48882       if test ! -f "$path" && test ! -d "$path"; then
48883         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48884       fi
48885 
48886       if test -d "$path"; then
48887         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48888       else
48889         dir="`$DIRNAME "$path"`"
48890         base="`$BASENAME "$path"`"
48891         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48892       fi
48893     fi
48894   fi
48895 
48896     if test ! -d "$JT_HOME"; then
48897       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48898     fi
48899 
48900     if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48901       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48902     fi
48903 
48904     JTREGEXE="$JT_HOME/bin/jtreg"
48905     if test ! -x "$JTREGEXE"; then
48906       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48907     fi
48908 
48909     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48910 $as_echo_n "checking for jtreg test harness... " >&6; }
48911     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48912 $as_echo "$JT_HOME" >&6; }
48913   else
48914     # Try to locate jtreg
48915     if test "x$JT_HOME" != x; then
48916       # JT_HOME set in environment, use it
48917       if test ! -d "$JT_HOME"; then
48918         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48919 $as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48920         JT_HOME=
48921       else
48922         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48923           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48924 $as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48925           JT_HOME=
48926         elif test ! -x "$JT_HOME/bin/jtreg"; then
48927           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48928 $as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48929           JT_HOME=
48930         else
48931           JTREGEXE="$JT_HOME/bin/jtreg"
48932           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48933 $as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48934         fi
48935       fi
48936     fi
48937 
48938     if test "x$JT_HOME" = x; then
48939       # JT_HOME is not set in environment, or was deemed invalid.
48940       # Try to find jtreg on path
48941 
48942 
48943   # Publish this variable in the help.
48944 
48945 
48946   if [ -z "${JTREGEXE+x}" ]; then
48947     # The variable is not set by user, try to locate tool using the code snippet
48948     for ac_prog in jtreg
48949 do
48950   # Extract the first word of "$ac_prog", so it can be a program name with args.
48951 set dummy $ac_prog; ac_word=$2
48952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48953 $as_echo_n "checking for $ac_word... " >&6; }
48954 if ${ac_cv_path_JTREGEXE+:} false; then :
48955   $as_echo_n "(cached) " >&6
48956 else
48957   case $JTREGEXE in
48958   [\\/]* | ?:[\\/]*)
48959   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48960   ;;
48961   *)
48962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48963 for as_dir in $PATH
48964 do
48965   IFS=$as_save_IFS
48966   test -z "$as_dir" && as_dir=.
48967     for ac_exec_ext in '' $ac_executable_extensions; do
48968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48969     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48971     break 2
48972   fi
48973 done
48974   done
48975 IFS=$as_save_IFS
48976 
48977   ;;
48978 esac
48979 fi
48980 JTREGEXE=$ac_cv_path_JTREGEXE
48981 if test -n "$JTREGEXE"; then
48982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48983 $as_echo "$JTREGEXE" >&6; }
48984 else
48985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48986 $as_echo "no" >&6; }
48987 fi
48988 
48989 
48990   test -n "$JTREGEXE" && break
48991 done
48992 
48993   else
48994     # The variable is set, but is it from the command line or the environment?
48995 
48996     # Try to remove the string !JTREGEXE! from our list.
48997     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48998     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48999       # If it failed, the variable was not from the command line. Ignore it,
49000       # but warn the user (except for BASH, which is always set by the calling BASH).
49001       if test "xJTREGEXE" != xBASH; then
49002         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
49003 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
49004       fi
49005       # Try to locate tool using the code snippet
49006       for ac_prog in jtreg
49007 do
49008   # Extract the first word of "$ac_prog", so it can be a program name with args.
49009 set dummy $ac_prog; ac_word=$2
49010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49011 $as_echo_n "checking for $ac_word... " >&6; }
49012 if ${ac_cv_path_JTREGEXE+:} false; then :
49013   $as_echo_n "(cached) " >&6
49014 else
49015   case $JTREGEXE in
49016   [\\/]* | ?:[\\/]*)
49017   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49018   ;;
49019   *)
49020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49021 for as_dir in $PATH
49022 do
49023   IFS=$as_save_IFS
49024   test -z "$as_dir" && as_dir=.
49025     for ac_exec_ext in '' $ac_executable_extensions; do
49026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49027     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49029     break 2
49030   fi
49031 done
49032   done
49033 IFS=$as_save_IFS
49034 
49035   ;;
49036 esac
49037 fi
49038 JTREGEXE=$ac_cv_path_JTREGEXE
49039 if test -n "$JTREGEXE"; then
49040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49041 $as_echo "$JTREGEXE" >&6; }
49042 else
49043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49044 $as_echo "no" >&6; }
49045 fi
49046 
49047 
49048   test -n "$JTREGEXE" && break
49049 done
49050 
49051     else
49052       # If it succeeded, then it was overridden by the user. We will use it
49053       # for the tool.
49054 
49055       # First remove it from the list of overridden variables, so we can test
49056       # for unknown variables in the end.
49057       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49058 
49059       # Check if we try to supply an empty value
49060       if test "x$JTREGEXE" = x; then
49061         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
49062 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
49063         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49064 $as_echo_n "checking for JTREGEXE... " >&6; }
49065         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
49066 $as_echo "disabled" >&6; }
49067       else
49068         # Check if the provided tool contains a complete path.
49069         tool_specified="$JTREGEXE"
49070         tool_basename="${tool_specified##*/}"
49071         if test "x$tool_basename" = "x$tool_specified"; then
49072           # A command without a complete path is provided, search $PATH.
49073           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49074 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49075           # Extract the first word of "$tool_basename", so it can be a program name with args.
49076 set dummy $tool_basename; ac_word=$2
49077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49078 $as_echo_n "checking for $ac_word... " >&6; }
49079 if ${ac_cv_path_JTREGEXE+:} false; then :
49080   $as_echo_n "(cached) " >&6
49081 else
49082   case $JTREGEXE in
49083   [\\/]* | ?:[\\/]*)
49084   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49085   ;;
49086   *)
49087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49088 for as_dir in $PATH
49089 do
49090   IFS=$as_save_IFS
49091   test -z "$as_dir" && as_dir=.
49092     for ac_exec_ext in '' $ac_executable_extensions; do
49093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49094     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49096     break 2
49097   fi
49098 done
49099   done
49100 IFS=$as_save_IFS
49101 
49102   ;;
49103 esac
49104 fi
49105 JTREGEXE=$ac_cv_path_JTREGEXE
49106 if test -n "$JTREGEXE"; then
49107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49108 $as_echo "$JTREGEXE" >&6; }
49109 else
49110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49111 $as_echo "no" >&6; }
49112 fi
49113 
49114 
49115           if test "x$JTREGEXE" = x; then
49116             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49117           fi
49118         else
49119           # Otherwise we believe it is a complete path. Use it as it is.
49120           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49121 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49122           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49123 $as_echo_n "checking for JTREGEXE... " >&6; }
49124           if test ! -x "$tool_specified"; then
49125             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49126 $as_echo "not found" >&6; }
49127             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49128           fi
49129           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49130 $as_echo "$tool_specified" >&6; }
49131         fi
49132       fi
49133     fi
49134 
49135   fi
49136 
49137 
49138       if test "x$JTREGEXE" != x; then
49139         # That's good, now try to derive JT_HOME
49140         JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49141         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49142           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49143 $as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49144           JT_HOME=
49145           JTREGEXE=
49146         else
49147           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49148 $as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49149         fi
49150       fi
49151     fi
49152 
49153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49154 $as_echo_n "checking for jtreg test harness... " >&6; }
49155     if test "x$JT_HOME" != x; then
49156       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49157 $as_echo "$JT_HOME" >&6; }
49158     else
49159       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49160 $as_echo "no, not found" >&6; }
49161 
49162       if test "x$with_jtreg" = xyes; then
49163         as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49164       fi
49165     fi
49166   fi
49167 
49168 
49169   # Only process if variable expands to non-empty
49170 
49171   if test "x$JTREGEXE" != x; then
49172     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49173 
49174   # First separate the path from the arguments. This will split at the first
49175   # space.
49176   complete="$JTREGEXE"
49177   path="${complete%% *}"
49178   tmp="$complete EOL"
49179   arguments="${tmp#* }"
49180 
49181   # Input might be given as Windows format, start by converting to
49182   # unix format.
49183   new_path=`$CYGPATH -u "$path"`
49184 
49185   # Now try to locate executable using which
49186   new_path=`$WHICH "$new_path" 2> /dev/null`
49187   # bat and cmd files are not always considered executable in cygwin causing which
49188   # to not find them
49189   if test "x$new_path" = x \
49190       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49191       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49192     new_path=`$CYGPATH -u "$path"`
49193   fi
49194   if test "x$new_path" = x; then
49195     # Oops. Which didn't find the executable.
49196     # The splitting of arguments from the executable at a space might have been incorrect,
49197     # since paths with space are more likely in Windows. Give it another try with the whole
49198     # argument.
49199     path="$complete"
49200     arguments="EOL"
49201     new_path=`$CYGPATH -u "$path"`
49202     new_path=`$WHICH "$new_path" 2> /dev/null`
49203     # bat and cmd files are not always considered executable in cygwin causing which
49204     # to not find them
49205     if test "x$new_path" = x \
49206         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49207         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49208       new_path=`$CYGPATH -u "$path"`
49209     fi
49210     if test "x$new_path" = x; then
49211       # It's still not found. Now this is an unrecoverable error.
49212       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49213 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49214       has_space=`$ECHO "$complete" | $GREP " "`
49215       if test "x$has_space" != x; then
49216         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49217 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49218       fi
49219       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49220     fi
49221   fi
49222 
49223   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49224   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49225   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49226   # "foo.exe" is OK but "foo" is an error.
49227   #
49228   # This test is therefore slightly more accurate than "test -f" to check for file presence.
49229   # It is also a way to make sure we got the proper file name for the real test later on.
49230   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49231   if test "x$test_shortpath" = x; then
49232     # Short path failed, file does not exist as specified.
49233     # Try adding .exe or .cmd
49234     if test -f "${new_path}.exe"; then
49235       input_to_shortpath="${new_path}.exe"
49236     elif test -f "${new_path}.cmd"; then
49237       input_to_shortpath="${new_path}.cmd"
49238     else
49239       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49240 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49241       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49242 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49243       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49244     fi
49245   else
49246     input_to_shortpath="$new_path"
49247   fi
49248 
49249   # Call helper function which possibly converts this using DOS-style short mode.
49250   # If so, the updated path is stored in $new_path.
49251   new_path="$input_to_shortpath"
49252 
49253   input_path="$input_to_shortpath"
49254   # Check if we need to convert this using DOS-style short mode. If the path
49255   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49256   # take no chances and rewrite it.
49257   # Note: m4 eats our [], so we need to use [ and ] instead.
49258   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49259   if test "x$has_forbidden_chars" != x; then
49260     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49261     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49262     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49263     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49264       # Going to short mode and back again did indeed matter. Since short mode is
49265       # case insensitive, let's make it lowercase to improve readability.
49266       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49267       # Now convert it back to Unix-style (cygpath)
49268       input_path=`$CYGPATH -u "$shortmode_path"`
49269       new_path="$input_path"
49270     fi
49271   fi
49272 
49273   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49274   if test "x$test_cygdrive_prefix" = x; then
49275     # As a simple fix, exclude /usr/bin since it's not a real path.
49276     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49277       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49278       # a path prefixed by /cygdrive for fixpath to work.
49279       new_path="$CYGWIN_ROOT_PATH$input_path"
49280     fi
49281   fi
49282 
49283   # remove trailing .exe if any
49284   new_path="${new_path/%.exe/}"
49285 
49286     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49287 
49288   # First separate the path from the arguments. This will split at the first
49289   # space.
49290   complete="$JTREGEXE"
49291   path="${complete%% *}"
49292   tmp="$complete EOL"
49293   arguments="${tmp#* }"
49294 
49295   # Input might be given as Windows format, start by converting to
49296   # unix format.
49297   new_path="$path"
49298 
49299   windows_path="$new_path"
49300   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49301     unix_path=`$CYGPATH -u "$windows_path"`
49302     new_path="$unix_path"
49303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49304     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49305     new_path="$unix_path"
49306   fi
49307 
49308 
49309   # Now try to locate executable using which
49310   new_path=`$WHICH "$new_path" 2> /dev/null`
49311 
49312   if test "x$new_path" = x; then
49313     # Oops. Which didn't find the executable.
49314     # The splitting of arguments from the executable at a space might have been incorrect,
49315     # since paths with space are more likely in Windows. Give it another try with the whole
49316     # argument.
49317     path="$complete"
49318     arguments="EOL"
49319     new_path="$path"
49320 
49321   windows_path="$new_path"
49322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49323     unix_path=`$CYGPATH -u "$windows_path"`
49324     new_path="$unix_path"
49325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49327     new_path="$unix_path"
49328   fi
49329 
49330 
49331     new_path=`$WHICH "$new_path" 2> /dev/null`
49332     # bat and cmd files are not always considered executable in MSYS causing which
49333     # to not find them
49334     if test "x$new_path" = x \
49335         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49336         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49337       new_path="$path"
49338 
49339   windows_path="$new_path"
49340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49341     unix_path=`$CYGPATH -u "$windows_path"`
49342     new_path="$unix_path"
49343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49345     new_path="$unix_path"
49346   fi
49347 
49348     fi
49349 
49350     if test "x$new_path" = x; then
49351       # It's still not found. Now this is an unrecoverable error.
49352       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49353 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49354       has_space=`$ECHO "$complete" | $GREP " "`
49355       if test "x$has_space" != x; then
49356         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49357 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49358       fi
49359       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49360     fi
49361   fi
49362 
49363   # Now new_path has a complete unix path to the binary
49364   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49365     # Keep paths in /bin as-is, but remove trailing .exe if any
49366     new_path="${new_path/%.exe/}"
49367     # Do not save /bin paths to all_fixpath_prefixes!
49368   else
49369     # Not in mixed or Windows style, start by that.
49370     new_path=`cmd //c echo $new_path`
49371 
49372   input_path="$new_path"
49373   # Check if we need to convert this using DOS-style short mode. If the path
49374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49375   # take no chances and rewrite it.
49376   # Note: m4 eats our [], so we need to use [ and ] instead.
49377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49378   if test "x$has_forbidden_chars" != x; then
49379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49380     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49381   fi
49382 
49383     # Output is in $new_path
49384 
49385   windows_path="$new_path"
49386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49387     unix_path=`$CYGPATH -u "$windows_path"`
49388     new_path="$unix_path"
49389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49391     new_path="$unix_path"
49392   fi
49393 
49394     # remove trailing .exe if any
49395     new_path="${new_path/%.exe/}"
49396 
49397     # Save the first 10 bytes of this path to the storage, so fixpath can work.
49398     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49399   fi
49400 
49401     else
49402       # We're on a unix platform. Hooray! :)
49403       # First separate the path from the arguments. This will split at the first
49404       # space.
49405       complete="$JTREGEXE"
49406       path="${complete%% *}"
49407       tmp="$complete EOL"
49408       arguments="${tmp#* }"
49409 
49410       # Cannot rely on the command "which" here since it doesn't always work.
49411       is_absolute_path=`$ECHO "$path" | $GREP ^/`
49412       if test -z "$is_absolute_path"; then
49413         # Path to executable is not absolute. Find it.
49414         IFS_save="$IFS"
49415         IFS=:
49416         for p in $PATH; do
49417           if test -f "$p/$path" && test -x "$p/$path"; then
49418             new_path="$p/$path"
49419             break
49420           fi
49421         done
49422         IFS="$IFS_save"
49423       else
49424         # This is an absolute path, we can use it without further modifications.
49425         new_path="$path"
49426       fi
49427 
49428       if test "x$new_path" = x; then
49429         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49430 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49431         has_space=`$ECHO "$complete" | $GREP " "`
49432         if test "x$has_space" != x; then
49433           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49434 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49435         fi
49436         as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49437       fi
49438     fi
49439 
49440     # Now join together the path and the arguments once again
49441     if test "x$arguments" != xEOL; then
49442       new_complete="$new_path ${arguments% *}"
49443     else
49444       new_complete="$new_path"
49445     fi
49446 
49447     if test "x$complete" != "x$new_complete"; then
49448       JTREGEXE="$new_complete"
49449       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49450 $as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49451     fi
49452   fi
49453 
49454 
49455   # Only process if variable expands to non-empty
49456 
49457   if test "x$JT_HOME" != x; then
49458     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49459 
49460   # Input might be given as Windows format, start by converting to
49461   # unix format.
49462   path="$JT_HOME"
49463   new_path=`$CYGPATH -u "$path"`
49464 
49465   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49466   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49467   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49468   # "foo.exe" is OK but "foo" is an error.
49469   #
49470   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49471   # It is also a way to make sure we got the proper file name for the real test later on.
49472   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49473   if test "x$test_shortpath" = x; then
49474     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49475 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49476     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49477   fi
49478 
49479   # Call helper function which possibly converts this using DOS-style short mode.
49480   # If so, the updated path is stored in $new_path.
49481 
49482   input_path="$new_path"
49483   # Check if we need to convert this using DOS-style short mode. If the path
49484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49485   # take no chances and rewrite it.
49486   # Note: m4 eats our [], so we need to use [ and ] instead.
49487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49488   if test "x$has_forbidden_chars" != x; then
49489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49490     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49491     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49492     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49493       # Going to short mode and back again did indeed matter. Since short mode is
49494       # case insensitive, let's make it lowercase to improve readability.
49495       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49496       # Now convert it back to Unix-style (cygpath)
49497       input_path=`$CYGPATH -u "$shortmode_path"`
49498       new_path="$input_path"
49499     fi
49500   fi
49501 
49502   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49503   if test "x$test_cygdrive_prefix" = x; then
49504     # As a simple fix, exclude /usr/bin since it's not a real path.
49505     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49506       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49507       # a path prefixed by /cygdrive for fixpath to work.
49508       new_path="$CYGWIN_ROOT_PATH$input_path"
49509     fi
49510   fi
49511 
49512 
49513   if test "x$path" != "x$new_path"; then
49514     JT_HOME="$new_path"
49515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49516 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49517   fi
49518 
49519     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49520 
49521   path="$JT_HOME"
49522   has_colon=`$ECHO $path | $GREP ^.:`
49523   new_path="$path"
49524   if test "x$has_colon" = x; then
49525     # Not in mixed or Windows style, start by that.
49526     new_path=`cmd //c echo $path`
49527   fi
49528 
49529 
49530   input_path="$new_path"
49531   # Check if we need to convert this using DOS-style short mode. If the path
49532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49533   # take no chances and rewrite it.
49534   # Note: m4 eats our [], so we need to use [ and ] instead.
49535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49536   if test "x$has_forbidden_chars" != x; then
49537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49538     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49539   fi
49540 
49541 
49542   windows_path="$new_path"
49543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49544     unix_path=`$CYGPATH -u "$windows_path"`
49545     new_path="$unix_path"
49546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49548     new_path="$unix_path"
49549   fi
49550 
49551   if test "x$path" != "x$new_path"; then
49552     JT_HOME="$new_path"
49553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49554 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49555   fi
49556 
49557   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49558   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49559 
49560     else
49561       # We're on a unix platform. Hooray! :)
49562       path="$JT_HOME"
49563       has_space=`$ECHO "$path" | $GREP " "`
49564       if test "x$has_space" != x; then
49565         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49566 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49567         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49568       fi
49569 
49570       # Use eval to expand a potential ~
49571       eval path="$path"
49572       if test ! -f "$path" && test ! -d "$path"; then
49573         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49574       fi
49575 
49576       if test -d "$path"; then
49577         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49578       else
49579         dir="`$DIRNAME "$path"`"
49580         base="`$BASENAME "$path"`"
49581         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49582       fi
49583     fi
49584   fi
49585 
49586 
49587 
49588 
49589 
49590 # Setup Jib dependency tool
49591 
49592 
49593 # Check whether --with-jib was given.
49594 if test "${with_jib+set}" = set; then :
49595   withval=$with_jib;
49596 fi
49597 
49598 
49599   if test "x$with_jib" = xno || test "x$with_jib" = x; then
49600     # jib disabled
49601     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49602 $as_echo_n "checking for jib... " >&6; }
49603     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49604 $as_echo "no" >&6; }
49605   elif test "x$with_jib" = xyes; then
49606     as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49607   else
49608     JIB_HOME="${with_jib}"
49609     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49610 $as_echo_n "checking for jib... " >&6; }
49611     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49612 $as_echo "${JIB_HOME}" >&6; }
49613     if test ! -d "${JIB_HOME}"; then
49614       as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49615     fi
49616     JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49617     if test ! -f "${JIB_JAR}"; then
49618       as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49619     fi
49620   fi
49621 
49622 
49623 
49624 
49625 
49626   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49627   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49628   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49629   #                              commands produced by the link step (currently AIX only)
49630   if test "x$TOOLCHAIN_TYPE" = xxlc; then
49631     COMPILER_TARGET_BITS_FLAG="-q"
49632     COMPILER_COMMAND_FILE_FLAG="-f"
49633     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49634   else
49635     COMPILER_TARGET_BITS_FLAG="-m"
49636     COMPILER_COMMAND_FILE_FLAG="@"
49637     COMPILER_BINDCMD_FILE_FLAG=""
49638 
49639     # The solstudio linker does not support @-files.
49640     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49641       COMPILER_COMMAND_FILE_FLAG=
49642     fi
49643 
49644     # Check if @file is supported by gcc
49645     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49646       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49647 $as_echo_n "checking if @file is supported by gcc... " >&6; }
49648       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49649       $ECHO "" "--version" > command.file
49650       if $CXX @command.file 2>&5 >&5; then
49651         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49652 $as_echo "yes" >&6; }
49653         COMPILER_COMMAND_FILE_FLAG="@"
49654       else
49655         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49656 $as_echo "no" >&6; }
49657         COMPILER_COMMAND_FILE_FLAG=
49658       fi
49659       $RM command.file
49660     fi
49661   fi
49662 
49663 
49664 
49665 
49666   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49667   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49668     ARFLAGS="-r"
49669   elif test "x$OPENJDK_TARGET_OS" = xaix; then
49670     ARFLAGS="-X64"
49671   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49672     # lib.exe is used as AR to create static libraries.
49673     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49674   else
49675     ARFLAGS=""
49676   fi
49677 
49678 
49679   ## Setup strip.
49680   # FIXME: should this really be per platform, or should it be per toolchain type?
49681   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49682   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49683   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49684     STRIPFLAGS="-g"
49685   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49686     STRIPFLAGS="-x"
49687   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49688     STRIPFLAGS="-S"
49689   elif test "x$OPENJDK_TARGET_OS" = xaix; then
49690     STRIPFLAGS="-X32_64"
49691   fi
49692 
49693 
49694 
49695   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49696     CC_OUT_OPTION=-Fo
49697     EXE_OUT_OPTION=-out:
49698     LD_OUT_OPTION=-out:
49699     AR_OUT_OPTION=-out:
49700   else
49701     # The option used to specify the target .o,.a or .so file.
49702     # When compiling, how to specify the to be created object file.
49703     CC_OUT_OPTION='-o$(SPACE)'
49704     # When linking, how to specify the to be created executable.
49705     EXE_OUT_OPTION='-o$(SPACE)'
49706     # When linking, how to specify the to be created dynamically linkable library.
49707     LD_OUT_OPTION='-o$(SPACE)'
49708     # When archiving, how to specify the to be create static archive for object files.
49709     AR_OUT_OPTION='rcs$(SPACE)'
49710   fi
49711 
49712 
49713 
49714 
49715 
49716   # On Windows, we need to set RC flags.
49717   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49718     RC_FLAGS="-nologo -l0x409"
49719     JVM_RCFLAGS="-nologo"
49720     if test "x$DEBUG_LEVEL" = xrelease; then
49721       RC_FLAGS="$RC_FLAGS -DNDEBUG"
49722       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49723     fi
49724 
49725     # The version variables used to create RC_FLAGS may be overridden
49726     # in a custom configure script, or possibly the command line.
49727     # Let those variables be expanded at make time in spec.gmk.
49728     # The \$ are escaped to the shell, and the $(...) variables
49729     # are evaluated by make.
49730     RC_FLAGS="$RC_FLAGS \
49731         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49732         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49733         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49734         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49735         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49736         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49737         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49738 
49739     JVM_RCFLAGS="$JVM_RCFLAGS \
49740         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49741         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49742         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49743         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49744         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49745         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49746         -D\"HS_FNAME=jvm.dll\" \
49747         -D\"HS_INTERNAL_NAME=jvm\""
49748   fi
49749 
49750 
49751 
49752   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49753     # silence copyright notice and other headers.
49754     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49755   fi
49756 
49757 
49758 # Now we can test some aspects on the target using configure macros.
49759 
49760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49761 $as_echo_n "checking for ANSI C header files... " >&6; }
49762 if ${ac_cv_header_stdc+:} false; then :
49763   $as_echo_n "(cached) " >&6
49764 else
49765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49766 /* end confdefs.h.  */
49767 #include <stdlib.h>
49768 #include <stdarg.h>
49769 #include <string.h>
49770 #include <float.h>
49771 
49772 int
49773 main ()
49774 {
49775 
49776   ;
49777   return 0;
49778 }
49779 _ACEOF
49780 if ac_fn_cxx_try_compile "$LINENO"; then :
49781   ac_cv_header_stdc=yes
49782 else
49783   ac_cv_header_stdc=no
49784 fi
49785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49786 
49787 if test $ac_cv_header_stdc = yes; then
49788   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49789   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49790 /* end confdefs.h.  */
49791 #include <string.h>
49792 
49793 _ACEOF
49794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49795   $EGREP "memchr" >/dev/null 2>&1; then :
49796 
49797 else
49798   ac_cv_header_stdc=no
49799 fi
49800 rm -f conftest*
49801 
49802 fi
49803 
49804 if test $ac_cv_header_stdc = yes; then
49805   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49807 /* end confdefs.h.  */
49808 #include <stdlib.h>
49809 
49810 _ACEOF
49811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49812   $EGREP "free" >/dev/null 2>&1; then :
49813 
49814 else
49815   ac_cv_header_stdc=no
49816 fi
49817 rm -f conftest*
49818 
49819 fi
49820 
49821 if test $ac_cv_header_stdc = yes; then
49822   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49823   if test "$cross_compiling" = yes; then :
49824   :
49825 else
49826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49827 /* end confdefs.h.  */
49828 #include <ctype.h>
49829 #include <stdlib.h>
49830 #if ((' ' & 0x0FF) == 0x020)
49831 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49832 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49833 #else
49834 # define ISLOWER(c) \
49835                    (('a' <= (c) && (c) <= 'i') \
49836                      || ('j' <= (c) && (c) <= 'r') \
49837                      || ('s' <= (c) && (c) <= 'z'))
49838 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49839 #endif
49840 
49841 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49842 int
49843 main ()
49844 {
49845   int i;
49846   for (i = 0; i < 256; i++)
49847     if (XOR (islower (i), ISLOWER (i))
49848         || toupper (i) != TOUPPER (i))
49849       return 2;
49850   return 0;
49851 }
49852 _ACEOF
49853 if ac_fn_cxx_try_run "$LINENO"; then :
49854 
49855 else
49856   ac_cv_header_stdc=no
49857 fi
49858 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49859   conftest.$ac_objext conftest.beam conftest.$ac_ext
49860 fi
49861 
49862 fi
49863 fi
49864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49865 $as_echo "$ac_cv_header_stdc" >&6; }
49866 if test $ac_cv_header_stdc = yes; then
49867 
49868 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
49869 
49870 fi
49871 
49872 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
49873 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49874                   inttypes.h stdint.h unistd.h
49875 do :
49876   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49877 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49878 "
49879 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49880   cat >>confdefs.h <<_ACEOF
49881 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49882 _ACEOF
49883 
49884 fi
49885 
49886 done
49887 
49888 
49889 
49890   ###############################################################################
49891   #
49892   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49893   # (The JVM can use 32 or 64 bit Java pointers but that decision
49894   # is made at runtime.)
49895   #
49896 
49897   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49898     # Always specify -m flag on Solaris
49899     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49900 
49901   # When we add flags to the "official" CFLAGS etc, we need to
49902   # keep track of these additions in ADDED_CFLAGS etc. These
49903   # will later be checked to make sure only controlled additions
49904   # have been made to CFLAGS etc.
49905   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49906   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49907   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49908 
49909   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49910   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49911   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49912 
49913   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49914   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49915   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49916 
49917   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49918   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49919   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49920 
49921   elif test "x$COMPILE_TYPE" = xreduced; then
49922     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49923       # Specify -m if running reduced on unix platforms
49924 
49925   # When we add flags to the "official" CFLAGS etc, we need to
49926   # keep track of these additions in ADDED_CFLAGS etc. These
49927   # will later be checked to make sure only controlled additions
49928   # have been made to CFLAGS etc.
49929   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49930   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49931   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49932 
49933   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49934   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49935   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49936 
49937   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49938   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49939   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49940 
49941   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49942   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49943   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49944 
49945     fi
49946   fi
49947   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49948     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49949     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49950     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49951   fi
49952 
49953   # Make compilation sanity check
49954   for ac_header in stdio.h
49955 do :
49956   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49957 if test "x$ac_cv_header_stdio_h" = xyes; then :
49958   cat >>confdefs.h <<_ACEOF
49959 #define HAVE_STDIO_H 1
49960 _ACEOF
49961 
49962 else
49963 
49964     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49965 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49966     if test "x$COMPILE_TYPE" = xreduced; then
49967 
49968   # Print a helpful message on how to acquire the necessary build dependency.
49969   # reduced is the help tag: freetype, cups, alsa etc
49970   MISSING_DEPENDENCY=reduced
49971 
49972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49973     cygwin_help $MISSING_DEPENDENCY
49974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49975     msys_help $MISSING_DEPENDENCY
49976   else
49977     PKGHANDLER_COMMAND=
49978 
49979     case $PKGHANDLER in
49980       apt-get)
49981         apt_help     $MISSING_DEPENDENCY ;;
49982       yum)
49983         yum_help     $MISSING_DEPENDENCY ;;
49984       brew)
49985         brew_help    $MISSING_DEPENDENCY ;;
49986       port)
49987         port_help    $MISSING_DEPENDENCY ;;
49988       pkgutil)
49989         pkgutil_help $MISSING_DEPENDENCY ;;
49990       pkgadd)
49991         pkgadd_help  $MISSING_DEPENDENCY ;;
49992     esac
49993 
49994     if test "x$PKGHANDLER_COMMAND" != x; then
49995       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49996     fi
49997   fi
49998 
49999       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50000 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50001     elif test "x$COMPILE_TYPE" = xcross; then
50002       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50003 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50004     fi
50005     as_fn_error $? "Cannot continue." "$LINENO" 5
50006 
50007 fi
50008 
50009 done
50010 
50011 
50012   # The cast to long int works around a bug in the HP C Compiler
50013 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50014 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50015 # This bug is HP SR number 8606223364.
50016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50017 $as_echo_n "checking size of int *... " >&6; }
50018 if ${ac_cv_sizeof_int_p+:} false; then :
50019   $as_echo_n "(cached) " >&6
50020 else
50021   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50022 
50023 else
50024   if test "$ac_cv_type_int_p" = yes; then
50025      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50026 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50027 as_fn_error 77 "cannot compute sizeof (int *)
50028 See \`config.log' for more details" "$LINENO" 5; }
50029    else
50030      ac_cv_sizeof_int_p=0
50031    fi
50032 fi
50033 
50034 fi
50035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50036 $as_echo "$ac_cv_sizeof_int_p" >&6; }
50037 
50038 
50039 
50040 cat >>confdefs.h <<_ACEOF
50041 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
50042 _ACEOF
50043 
50044 
50045 
50046   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
50047   if test "x$ac_cv_sizeof_int_p" = x; then
50048     # The test failed, lets stick to the assumed value.
50049     { $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
50050 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
50051   else
50052     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50053 
50054     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50055       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
50056       # Let's try to implicitely set the compilers target architecture and retry the test
50057       { $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
50058 $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;}
50059       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
50060 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
50061 
50062   # When we add flags to the "official" CFLAGS etc, we need to
50063   # keep track of these additions in ADDED_CFLAGS etc. These
50064   # will later be checked to make sure only controlled additions
50065   # have been made to CFLAGS etc.
50066   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50067   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50068   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50069 
50070   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
50071   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
50072   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
50073 
50074   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
50075   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
50076   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
50077 
50078   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
50079   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
50080   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
50081 
50082 
50083       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
50084       unset ac_cv_sizeof_int_p
50085       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
50086       cat >>confdefs.h <<_ACEOF
50087 #undef SIZEOF_INT_P
50088 _ACEOF
50089 
50090       # The cast to long int works around a bug in the HP C Compiler
50091 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50092 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50093 # This bug is HP SR number 8606223364.
50094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50095 $as_echo_n "checking size of int *... " >&6; }
50096 if ${ac_cv_sizeof_int_p+:} false; then :
50097   $as_echo_n "(cached) " >&6
50098 else
50099   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50100 
50101 else
50102   if test "$ac_cv_type_int_p" = yes; then
50103      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50104 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50105 as_fn_error 77 "cannot compute sizeof (int *)
50106 See \`config.log' for more details" "$LINENO" 5; }
50107    else
50108      ac_cv_sizeof_int_p=0
50109    fi
50110 fi
50111 
50112 fi
50113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50114 $as_echo "$ac_cv_sizeof_int_p" >&6; }
50115 
50116 
50117 
50118 cat >>confdefs.h <<_ACEOF
50119 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
50120 _ACEOF
50121 
50122 
50123 
50124       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50125 
50126       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50127         { $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
50128 $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;}
50129         if test "x$COMPILE_TYPE" = xreduced; then
50130 
50131   # Print a helpful message on how to acquire the necessary build dependency.
50132   # reduced is the help tag: freetype, cups, alsa etc
50133   MISSING_DEPENDENCY=reduced
50134 
50135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50136     cygwin_help $MISSING_DEPENDENCY
50137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50138     msys_help $MISSING_DEPENDENCY
50139   else
50140     PKGHANDLER_COMMAND=
50141 
50142     case $PKGHANDLER in
50143       apt-get)
50144         apt_help     $MISSING_DEPENDENCY ;;
50145       yum)
50146         yum_help     $MISSING_DEPENDENCY ;;
50147       brew)
50148         brew_help    $MISSING_DEPENDENCY ;;
50149       port)
50150         port_help    $MISSING_DEPENDENCY ;;
50151       pkgutil)
50152         pkgutil_help $MISSING_DEPENDENCY ;;
50153       pkgadd)
50154         pkgadd_help  $MISSING_DEPENDENCY ;;
50155     esac
50156 
50157     if test "x$PKGHANDLER_COMMAND" != x; then
50158       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50159     fi
50160   fi
50161 
50162           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50163 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50164         elif test "x$COMPILE_TYPE" = xcross; then
50165           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50166 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50167         fi
50168         as_fn_error $? "Cannot continue." "$LINENO" 5
50169       fi
50170     fi
50171   fi
50172 
50173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50174 $as_echo_n "checking for target address size... " >&6; }
50175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50176 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50177 
50178 
50179   ###############################################################################
50180   #
50181   # Is the target little of big endian?
50182   #
50183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50184 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50185 if ${ac_cv_c_bigendian+:} false; then :
50186   $as_echo_n "(cached) " >&6
50187 else
50188   ac_cv_c_bigendian=unknown
50189     # See if we're dealing with a universal compiler.
50190     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50191 /* end confdefs.h.  */
50192 #ifndef __APPLE_CC__
50193                not a universal capable compiler
50194              #endif
50195              typedef int dummy;
50196 
50197 _ACEOF
50198 if ac_fn_cxx_try_compile "$LINENO"; then :
50199 
50200         # Check for potential -arch flags.  It is not universal unless
50201         # there are at least two -arch flags with different values.
50202         ac_arch=
50203         ac_prev=
50204         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50205          if test -n "$ac_prev"; then
50206            case $ac_word in
50207              i?86 | x86_64 | ppc | ppc64)
50208                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50209                  ac_arch=$ac_word
50210                else
50211                  ac_cv_c_bigendian=universal
50212                  break
50213                fi
50214                ;;
50215            esac
50216            ac_prev=
50217          elif test "x$ac_word" = "x-arch"; then
50218            ac_prev=arch
50219          fi
50220        done
50221 fi
50222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50223     if test $ac_cv_c_bigendian = unknown; then
50224       # See if sys/param.h defines the BYTE_ORDER macro.
50225       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50226 /* end confdefs.h.  */
50227 #include <sys/types.h>
50228              #include <sys/param.h>
50229 
50230 int
50231 main ()
50232 {
50233 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50234                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50235                      && LITTLE_ENDIAN)
50236               bogus endian macros
50237              #endif
50238 
50239   ;
50240   return 0;
50241 }
50242 _ACEOF
50243 if ac_fn_cxx_try_compile "$LINENO"; then :
50244   # It does; now see whether it defined to BIG_ENDIAN or not.
50245          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50246 /* end confdefs.h.  */
50247 #include <sys/types.h>
50248                 #include <sys/param.h>
50249 
50250 int
50251 main ()
50252 {
50253 #if BYTE_ORDER != BIG_ENDIAN
50254                  not big endian
50255                 #endif
50256 
50257   ;
50258   return 0;
50259 }
50260 _ACEOF
50261 if ac_fn_cxx_try_compile "$LINENO"; then :
50262   ac_cv_c_bigendian=yes
50263 else
50264   ac_cv_c_bigendian=no
50265 fi
50266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50267 fi
50268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50269     fi
50270     if test $ac_cv_c_bigendian = unknown; then
50271       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50272       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50273 /* end confdefs.h.  */
50274 #include <limits.h>
50275 
50276 int
50277 main ()
50278 {
50279 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50280               bogus endian macros
50281              #endif
50282 
50283   ;
50284   return 0;
50285 }
50286 _ACEOF
50287 if ac_fn_cxx_try_compile "$LINENO"; then :
50288   # It does; now see whether it defined to _BIG_ENDIAN or not.
50289          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50290 /* end confdefs.h.  */
50291 #include <limits.h>
50292 
50293 int
50294 main ()
50295 {
50296 #ifndef _BIG_ENDIAN
50297                  not big endian
50298                 #endif
50299 
50300   ;
50301   return 0;
50302 }
50303 _ACEOF
50304 if ac_fn_cxx_try_compile "$LINENO"; then :
50305   ac_cv_c_bigendian=yes
50306 else
50307   ac_cv_c_bigendian=no
50308 fi
50309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50310 fi
50311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50312     fi
50313     if test $ac_cv_c_bigendian = unknown; then
50314       # Compile a test program.
50315       if test "$cross_compiling" = yes; then :
50316   # Try to guess by grepping values from an object file.
50317          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50318 /* end confdefs.h.  */
50319 short int ascii_mm[] =
50320                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50321                 short int ascii_ii[] =
50322                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50323                 int use_ascii (int i) {
50324                   return ascii_mm[i] + ascii_ii[i];
50325                 }
50326                 short int ebcdic_ii[] =
50327                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50328                 short int ebcdic_mm[] =
50329                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50330                 int use_ebcdic (int i) {
50331                   return ebcdic_mm[i] + ebcdic_ii[i];
50332                 }
50333                 extern int foo;
50334 
50335 int
50336 main ()
50337 {
50338 return use_ascii (foo) == use_ebcdic (foo);
50339   ;
50340   return 0;
50341 }
50342 _ACEOF
50343 if ac_fn_cxx_try_compile "$LINENO"; then :
50344   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50345               ac_cv_c_bigendian=yes
50346             fi
50347             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50348               if test "$ac_cv_c_bigendian" = unknown; then
50349                 ac_cv_c_bigendian=no
50350               else
50351                 # finding both strings is unlikely to happen, but who knows?
50352                 ac_cv_c_bigendian=unknown
50353               fi
50354             fi
50355 fi
50356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50357 else
50358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50359 /* end confdefs.h.  */
50360 $ac_includes_default
50361 int
50362 main ()
50363 {
50364 
50365              /* Are we little or big endian?  From Harbison&Steele.  */
50366              union
50367              {
50368                long int l;
50369                char c[sizeof (long int)];
50370              } u;
50371              u.l = 1;
50372              return u.c[sizeof (long int) - 1] == 1;
50373 
50374   ;
50375   return 0;
50376 }
50377 _ACEOF
50378 if ac_fn_cxx_try_run "$LINENO"; then :
50379   ac_cv_c_bigendian=no
50380 else
50381   ac_cv_c_bigendian=yes
50382 fi
50383 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50384   conftest.$ac_objext conftest.beam conftest.$ac_ext
50385 fi
50386 
50387     fi
50388 fi
50389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50390 $as_echo "$ac_cv_c_bigendian" >&6; }
50391  case $ac_cv_c_bigendian in #(
50392    yes)
50393      ENDIAN="big";; #(
50394    no)
50395      ENDIAN="little" ;; #(
50396    universal)
50397      ENDIAN="universal_endianness"
50398      ;; #(
50399    *)
50400      ENDIAN="unknown" ;;
50401  esac
50402 
50403 
50404   if test "x$ENDIAN" = xuniversal_endianness; then
50405     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50406   fi
50407   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50408     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
50409   fi
50410 
50411 
50412 # Configure flags for the tools
50413 
50414   ###############################################################################
50415   #
50416   # How to compile shared libraries.
50417   #
50418 
50419   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50420     PICFLAG="-fPIC"
50421     C_FLAG_REORDER=''
50422     CXX_FLAG_REORDER=''
50423 
50424     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50425       # Linking is different on MacOSX
50426       if test "x$STATIC_BUILD" = xtrue; then
50427         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50428       else
50429         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50430         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50431       fi
50432       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50433       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50434       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50435       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50436     else
50437       # Default works for linux, might work on other platforms as well.
50438       SHARED_LIBRARY_FLAGS='-shared'
50439       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50440       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50441       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50442       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50443     fi
50444   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50445     C_FLAG_REORDER=''
50446     CXX_FLAG_REORDER=''
50447 
50448     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50449       # Linking is different on MacOSX
50450       PICFLAG=''
50451       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50452       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50453       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50454       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50455       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50456 
50457       if test "x$STATIC_BUILD" = xfalse; then
50458         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50459       fi
50460     else
50461       # Default works for linux, might work on other platforms as well.
50462       PICFLAG='-fPIC'
50463       SHARED_LIBRARY_FLAGS='-shared'
50464       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50465       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50466       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50467 
50468       # arm specific settings
50469       if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50470         # '-Wl,-z,origin' isn't used on arm.
50471         SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50472       else
50473         SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50474       fi
50475 
50476     fi
50477   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50478     if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50479       PICFLAG="-xcode=pic32"
50480     else
50481       PICFLAG="-KPIC"
50482     fi
50483     C_FLAG_REORDER='-xF'
50484     CXX_FLAG_REORDER='-xF'
50485     SHARED_LIBRARY_FLAGS="-G"
50486     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50487     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50488     SET_SHARED_LIBRARY_NAME='-h $1'
50489     SET_SHARED_LIBRARY_MAPFILE='-M$1'
50490   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50491     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50492     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50493     # will have to patch this single instruction with a call to some out-of-order code which
50494     # does the load from the TOC. This is of course slow. But in that case we also would have
50495     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50496     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50497     # can be patched directly by the linker and does not require a jump to out-of-order code.
50498     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50499     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50500     # loads for accessing a global variable). But there are rumors that this may be seen as a
50501     # 'performance feature' because of improved code locality of the symbols used in a
50502     # compilation unit.
50503     PICFLAG="-qpic"
50504     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50505     C_FLAG_REORDER=''
50506     CXX_FLAG_REORDER=''
50507     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50508     SET_EXECUTABLE_ORIGIN=""
50509     SET_SHARED_LIBRARY_ORIGIN=''
50510     SET_SHARED_LIBRARY_NAME=''
50511     SET_SHARED_LIBRARY_MAPFILE=''
50512   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50513     PICFLAG=""
50514     C_FLAG_REORDER=''
50515     CXX_FLAG_REORDER=''
50516     SHARED_LIBRARY_FLAGS="-dll"
50517     SET_EXECUTABLE_ORIGIN=''
50518     SET_SHARED_LIBRARY_ORIGIN=''
50519     SET_SHARED_LIBRARY_NAME=''
50520     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50521   fi
50522 
50523 
50524 
50525 
50526 
50527 
50528 
50529 
50530 
50531   # The (cross) compiler is now configured, we can now test capabilities
50532   # of the target platform.
50533 
50534 
50535 
50536   ###############################################################################
50537   #
50538   # Setup the opt flags for different compilers
50539   # and different operating systems.
50540   #
50541 
50542   # FIXME: this was indirectly the old default, but just inherited.
50543   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50544   #   C_FLAG_DEPS="-MMD -MF"
50545   # fi
50546 
50547   # Generate make dependency files
50548   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50549     C_FLAG_DEPS="-MMD -MF"
50550   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50551     C_FLAG_DEPS="-MMD -MF"
50552   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50553     C_FLAG_DEPS="-xMMD -xMF"
50554   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50555     C_FLAG_DEPS="-qmakedep=gcc -MF"
50556   fi
50557   CXX_FLAG_DEPS="$C_FLAG_DEPS"
50558 
50559 
50560 
50561   # Debug symbols
50562   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50563     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50564       # reduce from default "-g2" option to save space
50565       CFLAGS_DEBUG_SYMBOLS="-g1"
50566       CXXFLAGS_DEBUG_SYMBOLS="-g1"
50567     else
50568       CFLAGS_DEBUG_SYMBOLS="-g"
50569       CXXFLAGS_DEBUG_SYMBOLS="-g"
50570     fi
50571   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50572     CFLAGS_DEBUG_SYMBOLS="-g"
50573     CXXFLAGS_DEBUG_SYMBOLS="-g"
50574   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50575     CFLAGS_DEBUG_SYMBOLS="-g -xs"
50576     # -g0 enables debug symbols without disabling inlining.
50577     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50578   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50579     CFLAGS_DEBUG_SYMBOLS="-g"
50580     CXXFLAGS_DEBUG_SYMBOLS="-g"
50581   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50582     CFLAGS_DEBUG_SYMBOLS="-Zi"
50583     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50584   fi
50585 
50586 
50587 
50588   # Debug symbols for JVM_CFLAGS
50589   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50590     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50591     if test "x$DEBUG_LEVEL" = xslowdebug; then
50592       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50593     else
50594       # -g0 does not disable inlining, which -g does.
50595       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50596     fi
50597   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50598     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50599   else
50600     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50601   fi
50602 
50603 
50604   # bounds, memory and behavior checking options
50605   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50606     case $DEBUG_LEVEL in
50607     release )
50608       # no adjustment
50609       ;;
50610     fastdebug )
50611       # no adjustment
50612       ;;
50613     slowdebug )
50614       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50615       # get's added conditionally on whether we produce debug symbols or not.
50616       # This is most likely not really correct.
50617 
50618       # Add runtime stack smashing and undefined behavior checks.
50619       # Not all versions of gcc support -fstack-protector
50620       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50621 
50622 
50623 
50624 
50625 
50626 
50627 
50628 
50629 
50630 
50631 
50632 
50633 
50634 
50635 
50636 
50637 
50638 
50639 
50640 
50641 
50642 
50643 
50644 
50645 
50646 
50647 
50648 
50649 
50650 
50651 
50652 
50653 
50654 
50655 
50656 
50657 
50658 
50659 
50660 
50661 
50662 
50663     # Execute function body
50664 
50665 
50666 
50667 
50668 
50669 
50670 
50671 
50672 
50673 
50674 
50675 
50676 
50677 
50678 
50679 
50680 
50681 
50682 
50683 
50684 
50685 
50686 
50687 
50688 
50689 
50690 
50691 
50692 
50693 
50694 
50695 
50696 
50697 
50698 
50699 
50700 
50701 
50702 
50703 
50704 
50705 
50706 
50707 
50708 
50709 
50710 
50711 
50712     # Execute function body
50713 
50714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50715 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50716   supports=yes
50717 
50718   saved_cflags="$CFLAGS"
50719   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50720   ac_ext=c
50721 ac_cpp='$CPP $CPPFLAGS'
50722 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50723 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50724 ac_compiler_gnu=$ac_cv_c_compiler_gnu
50725 
50726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50727 /* end confdefs.h.  */
50728 int i;
50729 _ACEOF
50730 if ac_fn_c_try_compile "$LINENO"; then :
50731 
50732 else
50733   supports=no
50734 fi
50735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50736   ac_ext=cpp
50737 ac_cpp='$CXXCPP $CPPFLAGS'
50738 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50739 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50740 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50741 
50742   CFLAGS="$saved_cflags"
50743 
50744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50745 $as_echo "$supports" >&6; }
50746   if test "x$supports" = "xyes" ; then
50747     :
50748     C_COMP_SUPPORTS="yes"
50749   else
50750     :
50751     C_COMP_SUPPORTS="no"
50752   fi
50753 
50754 
50755 
50756 
50757 
50758 
50759 
50760 
50761 
50762 
50763 
50764 
50765 
50766 
50767 
50768 
50769 
50770 
50771 
50772 
50773 
50774 
50775 
50776 
50777 
50778 
50779 
50780 
50781 
50782 
50783 
50784 
50785 
50786 
50787 
50788 
50789 
50790 
50791 
50792 
50793 
50794 
50795 
50796 
50797 
50798 
50799 
50800 
50801 
50802 
50803 
50804 
50805 
50806 
50807 
50808 
50809 
50810 
50811 
50812     # Execute function body
50813 
50814   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50815 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50816   supports=yes
50817 
50818   saved_cxxflags="$CXXFLAGS"
50819   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50820   ac_ext=cpp
50821 ac_cpp='$CXXCPP $CPPFLAGS'
50822 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50823 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50824 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50825 
50826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50827 /* end confdefs.h.  */
50828 int i;
50829 _ACEOF
50830 if ac_fn_cxx_try_compile "$LINENO"; then :
50831 
50832 else
50833   supports=no
50834 fi
50835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50836   ac_ext=cpp
50837 ac_cpp='$CXXCPP $CPPFLAGS'
50838 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50839 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50840 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50841 
50842   CXXFLAGS="$saved_cxxflags"
50843 
50844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50845 $as_echo "$supports" >&6; }
50846   if test "x$supports" = "xyes" ; then
50847     :
50848     CXX_COMP_SUPPORTS="yes"
50849   else
50850     :
50851     CXX_COMP_SUPPORTS="no"
50852   fi
50853 
50854 
50855 
50856 
50857 
50858 
50859 
50860 
50861 
50862 
50863 
50864 
50865 
50866   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50867 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50868   supports=no
50869   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50870 
50871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50872 $as_echo "$supports" >&6; }
50873   if test "x$supports" = "xyes" ; then
50874     :
50875 
50876   else
50877     :
50878     STACK_PROTECTOR_CFLAG=""
50879   fi
50880 
50881 
50882 
50883 
50884 
50885 
50886 
50887       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50888       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50889       if test "x$STACK_PROTECTOR_CFLAG" != x; then
50890         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50891       fi
50892       ;;
50893     esac
50894   fi
50895 
50896   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50897     if test "x$DEBUG_LEVEL" != xrelease; then
50898       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50899         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50900       fi
50901     fi
50902   fi
50903 
50904   # Optimization levels
50905   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50906     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50907 
50908     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50909       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50910       C_O_FLAG_HIGHEST_JVM="-xO4"
50911       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50912       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50913       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50914       C_O_FLAG_DEBUG="-xregs=no%frameptr"
50915       C_O_FLAG_DEBUG_JVM=""
50916       C_O_FLAG_NONE="-xregs=no%frameptr"
50917       CXX_O_FLAG_HIGHEST_JVM="-xO4"
50918       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50919       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50920       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50921       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50922       CXX_O_FLAG_DEBUG_JVM=""
50923       CXX_O_FLAG_NONE="-xregs=no%frameptr"
50924       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50925         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50926         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50927       fi
50928     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50929       C_O_FLAG_HIGHEST_JVM="-xO4"
50930       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50931       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50932       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50933       C_O_FLAG_DEBUG=""
50934       C_O_FLAG_DEBUG_JVM=""
50935       C_O_FLAG_NONE=""
50936       CXX_O_FLAG_HIGHEST_JVM="-xO4"
50937       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50938       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50939       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50940       CXX_O_FLAG_DEBUG=""
50941       CXX_O_FLAG_DEBUG_JVM=""
50942       CXX_O_FLAG_NONE=""
50943     fi
50944   else
50945     # The remaining toolchains share opt flags between CC and CXX;
50946     # setup for C and duplicate afterwards.
50947     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50948       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50949         # On MacOSX we optimize for size, something
50950         # we should do for all platforms?
50951         C_O_FLAG_HIGHEST_JVM="-Os"
50952         C_O_FLAG_HIGHEST="-Os"
50953         C_O_FLAG_HI="-Os"
50954         C_O_FLAG_NORM="-Os"
50955         C_O_FLAG_SIZE="-Os"
50956       else
50957         C_O_FLAG_HIGHEST_JVM="-O3"
50958         C_O_FLAG_HIGHEST="-O3"
50959         C_O_FLAG_HI="-O3"
50960         C_O_FLAG_NORM="-O2"
50961         C_O_FLAG_SIZE="-Os"
50962       fi
50963       C_O_FLAG_DEBUG="-O0"
50964       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50965         C_O_FLAG_DEBUG_JVM=""
50966       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50967         C_O_FLAG_DEBUG_JVM="-O0"
50968       fi
50969       C_O_FLAG_NONE="-O0"
50970     elif test "x$TOOLCHAIN_TYPE" = xclang; then
50971       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50972         # On MacOSX we optimize for size, something
50973         # we should do for all platforms?
50974         C_O_FLAG_HIGHEST_JVM="-Os"
50975         C_O_FLAG_HIGHEST="-Os"
50976         C_O_FLAG_HI="-Os"
50977         C_O_FLAG_NORM="-Os"
50978         C_O_FLAG_SIZE="-Os"
50979       else
50980         C_O_FLAG_HIGHEST_JVM="-O3"
50981         C_O_FLAG_HIGHEST="-O3"
50982         C_O_FLAG_HI="-O3"
50983         C_O_FLAG_NORM="-O2"
50984         C_O_FLAG_SIZE="-Os"
50985       fi
50986       C_O_FLAG_DEBUG="-O0"
50987       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50988         C_O_FLAG_DEBUG_JVM=""
50989       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50990         C_O_FLAG_DEBUG_JVM="-O0"
50991       fi
50992       C_O_FLAG_NONE="-O0"
50993     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50994       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50995       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50996       C_O_FLAG_HI="-O3 -qinline -qinlglue"
50997       C_O_FLAG_NORM="-O2"
50998       C_O_FLAG_DEBUG="-qnoopt"
50999       # FIXME: Value below not verified.
51000       C_O_FLAG_DEBUG_JVM=""
51001       C_O_FLAG_NONE="-qnoopt"
51002     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51003       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
51004       C_O_FLAG_HIGHEST="-O2"
51005       C_O_FLAG_HI="-O1"
51006       C_O_FLAG_NORM="-O1"
51007       C_O_FLAG_DEBUG="-Od"
51008       C_O_FLAG_DEBUG_JVM=""
51009       C_O_FLAG_NONE="-Od"
51010       C_O_FLAG_SIZE="-Os"
51011     fi
51012     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
51013     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
51014     CXX_O_FLAG_HI="$C_O_FLAG_HI"
51015     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
51016     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
51017     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
51018     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
51019     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
51020   fi
51021 
51022   # Adjust optimization flags according to debug level.
51023   case $DEBUG_LEVEL in
51024     release )
51025       # no adjustment
51026       ;;
51027     fastdebug )
51028       # Not quite so much optimization
51029       C_O_FLAG_HI="$C_O_FLAG_NORM"
51030       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
51031       ;;
51032     slowdebug )
51033       # Disable optimization
51034       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
51035       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
51036       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
51037       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
51038       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
51039       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
51040       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
51041       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
51042       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
51043       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
51044       ;;
51045   esac
51046 
51047 
51048 
51049 
51050 
51051 
51052 
51053 
51054 
51055 
51056 
51057 
51058 
51059 
51060 
51061 
51062 
51063 
51064 
51065 
51066 # Check whether --with-abi-profile was given.
51067 if test "${with_abi_profile+set}" = set; then :
51068   withval=$with_abi_profile;
51069 fi
51070 
51071 
51072   if test "x$with_abi_profile" != x; then
51073     if test "x$OPENJDK_TARGET_CPU" != xarm && \
51074         test "x$OPENJDK_TARGET_CPU" != xaarch64; then
51075       as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
51076     fi
51077 
51078     OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
51079     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
51080 $as_echo_n "checking for ABI profle... " >&6; }
51081     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
51082 $as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
51083 
51084     if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
51085       ARM_FLOAT_TYPE=vfp-sflt
51086       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51087     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
51088       ARM_FLOAT_TYPE=vfp-hflt
51089       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51090     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
51091       ARM_FLOAT_TYPE=sflt
51092       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51093     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
51094       ARM_FLOAT_TYPE=vfp-sflt
51095       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51096     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
51097       ARM_FLOAT_TYPE=vfp-hflt
51098       ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
51099     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
51100       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51101       ARM_FLOAT_TYPE=
51102       ARM_ARCH_TYPE_FLAGS=
51103     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
51104       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51105       ARM_FLOAT_TYPE=
51106       ARM_ARCH_TYPE_FLAGS=
51107     else
51108       as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51109     fi
51110 
51111     if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51112       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51113     elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51114       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51115     elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51116       ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51117     fi
51118     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51119 $as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51120     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51121 $as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51122 
51123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51124 $as_echo_n "checking for arch type flags... " >&6; }
51125     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51126 $as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51127 
51128     # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51129     # autoconf target triplet.
51130      JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51131     # Sanity check that it is a known ABI.
51132     if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51133         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51134         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51135           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51136 $as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51137     fi
51138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51139 $as_echo_n "checking for ABI property name... " >&6; }
51140     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51141 $as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51142 
51143 
51144     # Pass these on to the open part of configure as if they were set using
51145     # --with-extra-c[xx]flags.
51146     EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51147     EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51148     # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51149     # FIXME: This should not really be set using extra_cflags.
51150     if test "x$OPENJDK_TARGET_CPU" = xarm; then
51151         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51152         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51153     fi
51154     # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51155     EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51156     # And pass the architecture flags to the linker as well
51157     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51158   fi
51159 
51160   # When building with an abi profile, the name of that profile is appended on the
51161   # bundle platform, which is used in bundle names.
51162   if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51163     OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51164   fi
51165 
51166 
51167   # Optional POSIX functionality needed by the JVM
51168   #
51169   # Check if clock_gettime is available and in which library. This indicates
51170   # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
51171   # don't let it update LIBS.
51172   save_LIBS="$LIBS"
51173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
51174 $as_echo_n "checking for library containing clock_gettime... " >&6; }
51175 if ${ac_cv_search_clock_gettime+:} false; then :
51176   $as_echo_n "(cached) " >&6
51177 else
51178   ac_func_search_save_LIBS=$LIBS
51179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51180 /* end confdefs.h.  */
51181 
51182 /* Override any GCC internal prototype to avoid an error.
51183    Use char because int might match the return type of a GCC
51184    builtin and then its argument prototype would still apply.  */
51185 #ifdef __cplusplus
51186 extern "C"
51187 #endif
51188 char clock_gettime ();
51189 int
51190 main ()
51191 {
51192 return clock_gettime ();
51193   ;
51194   return 0;
51195 }
51196 _ACEOF
51197 for ac_lib in '' rt; do
51198   if test -z "$ac_lib"; then
51199     ac_res="none required"
51200   else
51201     ac_res=-l$ac_lib
51202     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
51203   fi
51204   if ac_fn_cxx_try_link "$LINENO"; then :
51205   ac_cv_search_clock_gettime=$ac_res
51206 fi
51207 rm -f core conftest.err conftest.$ac_objext \
51208     conftest$ac_exeext
51209   if ${ac_cv_search_clock_gettime+:} false; then :
51210   break
51211 fi
51212 done
51213 if ${ac_cv_search_clock_gettime+:} false; then :
51214 
51215 else
51216   ac_cv_search_clock_gettime=no
51217 fi
51218 rm conftest.$ac_ext
51219 LIBS=$ac_func_search_save_LIBS
51220 fi
51221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
51222 $as_echo "$ac_cv_search_clock_gettime" >&6; }
51223 ac_res=$ac_cv_search_clock_gettime
51224 if test "$ac_res" != no; then :
51225   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
51226   HAS_CLOCK_GETTIME=true
51227 fi
51228 
51229   if test "x$LIBS" = "x-lrt "; then
51230     CLOCK_GETTIME_IN_LIBRT=true
51231   fi
51232   LIBS="$save_LIBS"
51233 
51234 
51235   # Special extras...
51236   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51237     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51238       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51239       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51240     fi
51241     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51242     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51243   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51244     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51245     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51246   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51247     CXXSTD_CXXFLAG="-std=gnu++98"
51248 
51249 
51250 
51251 
51252 
51253 
51254 
51255 
51256 
51257 
51258 
51259 
51260 
51261 
51262 
51263 
51264 
51265 
51266 
51267 
51268 
51269 
51270 
51271 
51272 
51273 
51274 
51275 
51276 
51277 
51278 
51279 
51280 
51281 
51282 
51283 
51284 
51285 
51286 
51287 
51288 
51289 
51290     # Execute function body
51291 
51292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51293 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51294   supports=yes
51295 
51296   saved_cxxflags="$CXXFLAGS"
51297   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51298   ac_ext=cpp
51299 ac_cpp='$CXXCPP $CPPFLAGS'
51300 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51301 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51302 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51303 
51304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51305 /* end confdefs.h.  */
51306 int i;
51307 _ACEOF
51308 if ac_fn_cxx_try_compile "$LINENO"; then :
51309 
51310 else
51311   supports=no
51312 fi
51313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51314   ac_ext=cpp
51315 ac_cpp='$CXXCPP $CPPFLAGS'
51316 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51317 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51318 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51319 
51320   CXXFLAGS="$saved_cxxflags"
51321 
51322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51323 $as_echo "$supports" >&6; }
51324   if test "x$supports" = "xyes" ; then
51325     :
51326 
51327   else
51328     :
51329     CXXSTD_CXXFLAG=""
51330   fi
51331 
51332 
51333 
51334 
51335 
51336 
51337 
51338 
51339 
51340 
51341 
51342 
51343     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51344     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51345 
51346   fi
51347   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51348     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51349     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51350   fi
51351 
51352   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51353   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51354   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51355 
51356   ###############################################################################
51357   #
51358   # Now setup the CFLAGS and LDFLAGS for the JDK build.
51359   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51360   #
51361 
51362   # Setup compiler/platform specific flags into
51363   #    CFLAGS_JDK    - C Compiler flags
51364   #    CXXFLAGS_JDK  - C++ Compiler flags
51365   #    COMMON_CCXXFLAGS_JDK - common to C and C++
51366   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51367     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51368     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51369     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51370     if test "x$OPENJDK_TARGET_CPU" = xx86; then
51371       # Force compatibility with i586 on 32 bit intel platforms.
51372       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51373       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51374     fi
51375     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51376         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51377     case $OPENJDK_TARGET_CPU_ARCH in
51378       arm )
51379         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51380         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51381         COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51382         ;;
51383       ppc )
51384         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51385         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51386         ;;
51387       s390 )
51388         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51389         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51390         ;;
51391       * )
51392         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51393         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51394         ;;
51395     esac
51396 
51397 
51398 
51399 
51400 
51401 
51402 
51403 
51404 
51405 
51406 
51407 
51408 
51409 
51410 
51411 
51412 
51413 
51414 
51415 
51416 
51417 
51418 
51419 
51420 
51421 
51422 
51423 
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     # Execute function body
51451 
51452   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51453   REFERENCE_VERSION=6
51454 
51455   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51456     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51457   fi
51458 
51459   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51460     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51461   fi
51462 
51463   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51464   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51465 
51466   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51467     :
51468 
51469   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51470   # runs afoul of the more aggressive versions of these optimisations.
51471   # Notably, value range propagation now assumes that the this pointer of C++
51472   # member functions is non-null.
51473   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51474         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51475         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51476 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51477   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51478   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51479 
51480   else
51481     :
51482 
51483   fi
51484 
51485 
51486 
51487 
51488 
51489 
51490 
51491 
51492 
51493 
51494 
51495 
51496 
51497 
51498   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51499     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51500 
51501     # Restrict the debug information created by Clang to avoid
51502     # too big object files and speed the build up a little bit
51503     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51504     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51505     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51506       if test "x$OPENJDK_TARGET_CPU" = xx86; then
51507         # Force compatibility with i586 on 32 bit intel platforms.
51508         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51509         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51510       fi
51511       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51512       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51513           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51514       case $OPENJDK_TARGET_CPU_ARCH in
51515         ppc )
51516           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51517           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51518           ;;
51519         * )
51520           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51521           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51522           ;;
51523       esac
51524     fi
51525   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51526     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51527     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51528     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51529       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51530     fi
51531 
51532     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51533     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51534   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51535     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51536     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51537     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51538   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51539     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51540         -MD -Zc:wchar_t- -W3 -wd4800 \
51541         -DWIN32_LEAN_AND_MEAN \
51542         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51543         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51544         -DWIN32 -DIAL"
51545     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51546       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51547     else
51548       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51549     fi
51550     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51551     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51552     # studio.
51553     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51554       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51555       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51556       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51557     fi
51558   fi
51559 
51560   ###############################################################################
51561 
51562   # Adjust flags according to debug level.
51563   case $DEBUG_LEVEL in
51564     fastdebug | slowdebug )
51565       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51566       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51567       ;;
51568     release )
51569       ;;
51570     * )
51571       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51572       ;;
51573   esac
51574 
51575   # Set some common defines. These works for all compilers, but assume
51576   # -D is universally accepted.
51577 
51578   # Setup endianness
51579   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51580     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51581     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51582     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51583     #   Note: -Dmacro         is the same as    #define macro 1
51584     #         -Dmacro=        is the same as    #define macro
51585     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51586       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51587     else
51588       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51589     fi
51590   else
51591     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51592     # are defined in the system?
51593     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51594       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51595     else
51596       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51597     fi
51598   fi
51599 
51600   # Always enable optional macros for VM.
51601   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
51602   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
51603   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
51604 
51605   # Setup target OS define. Use OS target name but in upper case.
51606   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51607   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51608 
51609   # Setup target CPU
51610   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51611       $OPENJDK_TARGET_ADD_LP64 \
51612       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51613 
51614   # Setup debug/release defines
51615   if test "x$DEBUG_LEVEL" = xrelease; then
51616     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51617     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51618       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51619     fi
51620   else
51621     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51622   fi
51623 
51624   # Optional POSIX functionality needed by the VM
51625 
51626   if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
51627     JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
51628     if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
51629       JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
51630     fi
51631   fi
51632 
51633 
51634   # Set some additional per-OS defines.
51635   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51636     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51637     JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51638         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51639   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51640     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51641     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51642         -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
51643   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51644     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51645     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51646     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51647     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51648         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51649         -fno-omit-frame-pointer"
51650   elif test "x$OPENJDK_TARGET_OS" = xaix; then
51651     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51652     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51653         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51654         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51655     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51656     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51657     # so for slowdebug we build with '-qpic=large -bbigtoc'.
51658     if test "x$DEBUG_LEVEL" = xslowdebug; then
51659       JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
51660     fi
51661   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51662     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51663   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51664     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51665     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51666   fi
51667 
51668   # Set some additional per-CPU defines.
51669   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51670     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51671   elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xsolaris-sparcv9; then
51672     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51673   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51674     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51675       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51676       # fixes `relocation truncated to fit' error for gcc 4.1.
51677       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51678       # Use ppc64 instructions, but schedule for power5
51679       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51680     elif test "x$OPENJDK_TARGET_OS" = xaix; then
51681       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51682     fi
51683   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51684     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51685       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51686       # Little endian machine uses ELFv2 ABI.
51687       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51688       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51689       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51690     fi
51691   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51692     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51693       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51694     fi
51695   fi
51696 
51697   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51698     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51699   fi
51700 
51701   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51702     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51703       # Solaris does not have _LP64=1 in the old build.
51704       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51705       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51706     fi
51707   fi
51708 
51709   # Set JVM_CFLAGS warning handling
51710   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51711     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51712         -Wunused-value -Woverloaded-virtual"
51713 
51714     if test "x$TOOLCHAIN_TYPE" = xgcc; then
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 
51758 
51759 
51760 
51761 
51762 
51763 
51764 
51765 
51766 
51767 
51768 
51769     # Execute function body
51770 
51771   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51772   REFERENCE_VERSION=4.8
51773 
51774   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51775     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51776   fi
51777 
51778   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51779     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51780   fi
51781 
51782   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51783   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51784 
51785   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51786     :
51787 
51788             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51789             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51790 
51791 
51792   else
51793     :
51794 
51795   fi
51796 
51797 
51798 
51799 
51800 
51801 
51802 
51803 
51804 
51805 
51806 
51807 
51808 
51809 
51810     fi
51811     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51812       # Non-zero builds have stricter warnings
51813       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51814     else
51815       if test "x$TOOLCHAIN_TYPE" = xclang; then
51816         # Some versions of llvm do not like -Wundef
51817         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51818       fi
51819     fi
51820   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51821     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51822         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51823   fi
51824 
51825   # Additional macosx handling
51826   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51827     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
51828     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
51829     # JDK can be built and makes the linked binaries compatible even if built on
51830     # a newer version of the OS.
51831     MACOSX_VERSION_MIN=10.7.0
51832 
51833 
51834     # Setting --with-macosx-version-max=<version> makes it an error to build or
51835     # link to macosx APIs that are newer than the given OS version. The expected
51836     # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
51837 
51838 # Check whether --with-macosx-version-max was given.
51839 if test "${with_macosx_version_max+set}" = set; then :
51840   withval=$with_macosx_version_max;
51841           if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
51842               MACOSX_VERSION_MAX=$with_macosx_version_max
51843           elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
51844               MACOSX_VERSION_MAX=$with_macosx_version_max
51845           elif test "x$with_macosx_version_max" = "xno"; then
51846               # Use build system default
51847               MACOSX_VERSION_MAX=
51848           else
51849               as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
51850           fi
51851 
51852 else
51853   MACOSX_VERSION_MAX=
51854 
51855 fi
51856 
51857 
51858 
51859     # Let the flags variables get resolved in make for easier override on make
51860     # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
51861     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51862         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51863         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51864     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51865     JVM_CFLAGS="$JVM_CFLAGS \
51866         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51867         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51868 
51869     if test -n "$MACOSX_VERSION_MAX"; then
51870         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51871             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51872         JVM_CFLAGS="$JVM_CFLAGS \
51873             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51874     fi
51875   fi
51876 
51877   # Setup some hard coded includes
51878   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51879       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51880       -I${TOPDIR}/src/java.base/share/native/include \
51881       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51882       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51883       -I${TOPDIR}/src/java.base/share/native/libjava \
51884       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51885 
51886   # The shared libraries are compiled using the picflag.
51887   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51888       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51889   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51890       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51891 
51892   # Executable flags
51893   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51894   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51895 
51896 
51897 
51898 
51899 
51900 
51901   # Setup LDFLAGS et al.
51902   #
51903 
51904   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51905     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51906     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51907     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51908     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51909       LDFLAGS_SAFESH="-safeseh"
51910       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51911       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51912       # NOTE: Old build added -machine. Probably not needed.
51913       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51914     else
51915       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51916     fi
51917   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51918       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51919       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51920         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51921         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51922     fi
51923   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51924     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51925     # We have previously set HAS_GNU_HASH if this is the case
51926     if test -n "$HAS_GNU_HASH"; then
51927       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51928       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51929       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51930     fi
51931       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51932         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51933     fi
51934     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51935       # And since we now know that the linker is gnu, then add -z defs, to forbid
51936       # undefined symbols in object files.
51937       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51938       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51939       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51940       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51941       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51942       if test "x$OPENJDK_TARGET_CPU" = xx86; then
51943         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51944       fi
51945       case $DEBUG_LEVEL in
51946         release )
51947           # tell linker to optimize libraries.
51948           # Should this be supplied to the OSS linker as well?
51949           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51950           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51951           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51952           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51953             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51954           fi
51955           ;;
51956         slowdebug )
51957           # Hotspot always let the linker optimize
51958           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51959           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51960             # do relocations at load
51961             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51962             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51963             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51964           fi
51965           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51966             # mark relocations read only
51967             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51968             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51969             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51970           fi
51971           ;;
51972         fastdebug )
51973           # Hotspot always let the linker optimize
51974           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51975           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51976             # mark relocations read only
51977             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51978             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51979             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51980           fi
51981           ;;
51982         * )
51983           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51984           ;;
51985         esac
51986     fi
51987   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51988     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51989     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51990     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51991     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51992     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51993     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51994       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51995     fi
51996   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51997     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51998     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51999     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
52000     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52001     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52002     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52003     if test "x$DEBUG_LEVEL" = xslowdebug; then
52004       JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
52005     fi
52006   fi
52007 
52008   # Customize LDFLAGS for executables
52009 
52010   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
52011 
52012   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52013     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
52014       LDFLAGS_STACK_SIZE=1048576
52015     else
52016       LDFLAGS_STACK_SIZE=327680
52017     fi
52018     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52019   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
52020     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52021   fi
52022 
52023   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
52024 
52025   # Customize LDFLAGS for libs
52026   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
52027 
52028   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52029   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${LDFLAGS_NO_EXEC_STACK}"
52030   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52031     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52032         -libpath:${OUTPUTDIR}/support/modules_libs/java.base"
52033     JDKLIB_LIBS=""
52034   else
52035     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52036         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52037 
52038     if test "xTARGET" = "xTARGET"; then
52039       # On some platforms (mac) the linker warns about non existing -L dirs.
52040       # For any of the variants server, client or minimal, the dir matches the
52041       # variant name. The "main" variant should be used for linking. For the
52042       # rest, the dir is just server.
52043       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52044           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52045         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52046             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52047       else
52048         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52049             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52050       fi
52051     elif test "xTARGET" = "xBUILD"; then
52052       # When building a buildjdk, it's always only the server variant
52053       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52054           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52055     fi
52056 
52057     JDKLIB_LIBS="-ljava -ljvm"
52058     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52059       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
52060     fi
52061 
52062   fi
52063 
52064 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
52065 
52066   # Set JVM_LIBS (per os)
52067   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52068     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
52069   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
52070     # FIXME: This hard-coded path is not really proper.
52071     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52072       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52073     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
52074       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52075     fi
52076     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52077         -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52078   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52079     JVM_LIBS="$JVM_LIBS -lm"
52080   elif test "x$OPENJDK_TARGET_OS" = xaix; then
52081     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52082   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
52083     JVM_LIBS="$JVM_LIBS -lm"
52084   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
52085     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52086         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52087         wsock32.lib winmm.lib version.lib psapi.lib"
52088     fi
52089 
52090   # Set JVM_ASFLAGS
52091   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52092     if test "x$OPENJDK_TARGET_CPU" = xx86; then
52093       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
52094     fi
52095   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52096     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52097   fi
52098 
52099   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
52100 
52101 
52102 
52103 
52104 
52105 
52106 
52107 
52108 
52109 
52110 
52111 
52112 
52113 
52114 
52115 
52116   # Special extras...
52117   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52118     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52119       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52120       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52121     fi
52122     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52123     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52124   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52125     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52126     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52127   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52128     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
52129 
52130 
52131 
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     # Execute function body
52172 
52173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
52174 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
52175   supports=yes
52176 
52177   saved_cxxflags="$CXXFLAGS"
52178   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
52179   ac_ext=cpp
52180 ac_cpp='$CXXCPP $CPPFLAGS'
52181 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52182 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52183 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52184 
52185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52186 /* end confdefs.h.  */
52187 int i;
52188 _ACEOF
52189 if ac_fn_cxx_try_compile "$LINENO"; then :
52190 
52191 else
52192   supports=no
52193 fi
52194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52195   ac_ext=cpp
52196 ac_cpp='$CXXCPP $CPPFLAGS'
52197 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52198 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52199 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52200 
52201   CXXFLAGS="$saved_cxxflags"
52202 
52203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52204 $as_echo "$supports" >&6; }
52205   if test "x$supports" = "xyes" ; then
52206     :
52207 
52208   else
52209     :
52210     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
52211   fi
52212 
52213 
52214 
52215 
52216 
52217 
52218 
52219 
52220 
52221 
52222 
52223 
52224     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52225     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52226 
52227   fi
52228   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52229     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
52230     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
52231   fi
52232 
52233   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52234   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52235   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52236 
52237   ###############################################################################
52238   #
52239   # Now setup the CFLAGS and LDFLAGS for the JDK build.
52240   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52241   #
52242 
52243   # Setup compiler/platform specific flags into
52244   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52245   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52246   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52247   if test "x$TOOLCHAIN_TYPE" = xgcc; then
52248     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52249     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52250     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52251     if test "x$OPENJDK_BUILD_CPU" = xx86; then
52252       # Force compatibility with i586 on 32 bit intel platforms.
52253       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52254       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52255     fi
52256     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52257         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52258     case $OPENJDK_BUILD_CPU_ARCH in
52259       arm )
52260         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52261         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52262         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52263         ;;
52264       ppc )
52265         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52266         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52267         ;;
52268       s390 )
52269         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52270         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52271         ;;
52272       * )
52273         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52274         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52275         ;;
52276     esac
52277 
52278 
52279 
52280 
52281 
52282 
52283 
52284 
52285 
52286 
52287 
52288 
52289 
52290 
52291 
52292 
52293 
52294 
52295 
52296 
52297 
52298 
52299 
52300 
52301 
52302 
52303 
52304 
52305 
52306 
52307 
52308 
52309 
52310 
52311 
52312 
52313 
52314 
52315 
52316 
52317 
52318 
52319 
52320 
52321 
52322 
52323 
52324 
52325 
52326 
52327 
52328 
52329 
52330 
52331     # Execute function body
52332 
52333   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52334   REFERENCE_VERSION=6
52335 
52336   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52337     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52338   fi
52339 
52340   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52341     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52342   fi
52343 
52344   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52345   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52346 
52347   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52348     :
52349 
52350   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52351   # runs afoul of the more aggressive versions of these optimisations.
52352   # Notably, value range propagation now assumes that the this pointer of C++
52353   # member functions is non-null.
52354   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52355         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52356         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52357 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52358   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52359   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52360 
52361   else
52362     :
52363 
52364   fi
52365 
52366 
52367 
52368 
52369 
52370 
52371 
52372 
52373 
52374 
52375 
52376 
52377 
52378 
52379   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52380     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52381 
52382     # Restrict the debug information created by Clang to avoid
52383     # too big object files and speed the build up a little bit
52384     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52385     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52386     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52387       if test "x$OPENJDK_BUILD_CPU" = xx86; then
52388         # Force compatibility with i586 on 32 bit intel platforms.
52389         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52390         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52391       fi
52392       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52393       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52394           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52395       case $OPENJDK_BUILD_CPU_ARCH in
52396         ppc )
52397           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52398           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52399           ;;
52400         * )
52401           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52402           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52403           ;;
52404       esac
52405     fi
52406   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52407     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52408     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52409     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52410       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52411     fi
52412 
52413     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52414     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52415   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52416     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52417     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52418     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52419   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52420     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52421         -MD -Zc:wchar_t- -W3 -wd4800 \
52422         -DWIN32_LEAN_AND_MEAN \
52423         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52424         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52425         -DWIN32 -DIAL"
52426     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52427       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52428     else
52429       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52430     fi
52431     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52432     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52433     # studio.
52434     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52435       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52436       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52437       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52438     fi
52439   fi
52440 
52441   ###############################################################################
52442 
52443   # Adjust flags according to debug level.
52444   case $DEBUG_LEVEL in
52445     fastdebug | slowdebug )
52446       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52447       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52448       ;;
52449     release )
52450       ;;
52451     * )
52452       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52453       ;;
52454   esac
52455 
52456   # Set some common defines. These works for all compilers, but assume
52457   # -D is universally accepted.
52458 
52459   # Setup endianness
52460   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52461     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52462     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52463     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52464     #   Note: -Dmacro         is the same as    #define macro 1
52465     #         -Dmacro=        is the same as    #define macro
52466     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52467       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52468     else
52469       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52470     fi
52471   else
52472     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52473     # are defined in the system?
52474     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52475       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52476     else
52477       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52478     fi
52479   fi
52480 
52481   # Always enable optional macros for VM.
52482   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52483   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52484   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52485 
52486   # Setup target OS define. Use OS target name but in upper case.
52487   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52488   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52489 
52490   # Setup target CPU
52491   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52492       $OPENJDK_BUILD_ADD_LP64 \
52493       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52494 
52495   # Setup debug/release defines
52496   if test "x$DEBUG_LEVEL" = xrelease; then
52497     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52498     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52499       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52500     fi
52501   else
52502     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52503   fi
52504 
52505   # Optional POSIX functionality needed by the VM
52506 
52507   if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52508     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52509     if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52510       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
52511     fi
52512   fi
52513 
52514 
52515   # Set some additional per-OS defines.
52516   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52517     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52518     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52519         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52520   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52521     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52522     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52523         -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52524   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52525     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52526     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52527     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52528     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52529         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52530         -fno-omit-frame-pointer"
52531   elif test "x$OPENJDK_BUILD_OS" = xaix; then
52532     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52533     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52534         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52535         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52536     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52537     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52538     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52539     if test "x$DEBUG_LEVEL" = xslowdebug; then
52540       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
52541     fi
52542   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52543     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52544   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52545     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52546     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52547   fi
52548 
52549   # Set some additional per-CPU defines.
52550   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52551     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52552   elif test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xsolaris-sparcv9; then
52553     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52554   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52555     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52556       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52557       # fixes `relocation truncated to fit' error for gcc 4.1.
52558       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52559       # Use ppc64 instructions, but schedule for power5
52560       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52561     elif test "x$OPENJDK_BUILD_OS" = xaix; then
52562       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52563     fi
52564   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52565     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52566       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52567       # Little endian machine uses ELFv2 ABI.
52568       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52569       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52570       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52571     fi
52572   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52573     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52574       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52575     fi
52576   fi
52577 
52578   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52579     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52580   fi
52581 
52582   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52583     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52584       # Solaris does not have _LP64=1 in the old build.
52585       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52586       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52587     fi
52588   fi
52589 
52590   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52591   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52592     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52593         -Wunused-value -Woverloaded-virtual"
52594 
52595     if test "x$TOOLCHAIN_TYPE" = xgcc; then
52596 
52597 
52598 
52599 
52600 
52601 
52602 
52603 
52604 
52605 
52606 
52607 
52608 
52609 
52610 
52611 
52612 
52613 
52614 
52615 
52616 
52617 
52618 
52619 
52620 
52621 
52622 
52623 
52624 
52625 
52626 
52627 
52628 
52629 
52630 
52631 
52632 
52633 
52634 
52635 
52636 
52637 
52638 
52639 
52640 
52641 
52642 
52643 
52644 
52645 
52646 
52647 
52648 
52649 
52650     # Execute function body
52651 
52652   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52653   REFERENCE_VERSION=4.8
52654 
52655   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52656     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52657   fi
52658 
52659   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52660     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52661   fi
52662 
52663   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52664   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52665 
52666   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52667     :
52668 
52669             # These flags either do not work or give spurious warnings prior to gcc 4.8.
52670             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52671 
52672 
52673   else
52674     :
52675 
52676   fi
52677 
52678 
52679 
52680 
52681 
52682 
52683 
52684 
52685 
52686 
52687 
52688 
52689 
52690 
52691     fi
52692     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52693       # Non-zero builds have stricter warnings
52694       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52695     else
52696       if test "x$TOOLCHAIN_TYPE" = xclang; then
52697         # Some versions of llvm do not like -Wundef
52698         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52699       fi
52700     fi
52701   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52702     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52703         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52704   fi
52705 
52706   # Additional macosx handling
52707   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52708     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52709     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52710     # JDK can be built and makes the linked binaries compatible even if built on
52711     # a newer version of the OS.
52712     MACOSX_VERSION_MIN=10.7.0
52713 
52714 
52715     # Setting --with-macosx-version-max=<version> makes it an error to build or
52716     # link to macosx APIs that are newer than the given OS version. The expected
52717     # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
52718 
52719 # Check whether --with-macosx-version-max was given.
52720 if test "${with_macosx_version_max+set}" = set; then :
52721   withval=$with_macosx_version_max;
52722           if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
52723               MACOSX_VERSION_MAX=$with_macosx_version_max
52724           elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
52725               MACOSX_VERSION_MAX=$with_macosx_version_max
52726           elif test "x$with_macosx_version_max" = "xno"; then
52727               # Use build system default
52728               MACOSX_VERSION_MAX=
52729           else
52730               as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
52731           fi
52732 
52733 else
52734   MACOSX_VERSION_MAX=
52735 
52736 fi
52737 
52738 
52739 
52740     # Let the flags variables get resolved in make for easier override on make
52741     # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
52742     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52743         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52744         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52745     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52746     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52747         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52748         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52749 
52750     if test -n "$MACOSX_VERSION_MAX"; then
52751         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52752             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52753         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52754             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52755     fi
52756   fi
52757 
52758   # Setup some hard coded includes
52759   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52760       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52761       -I${TOPDIR}/src/java.base/share/native/include \
52762       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52763       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52764       -I${TOPDIR}/src/java.base/share/native/libjava \
52765       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52766 
52767   # The shared libraries are compiled using the picflag.
52768   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52769       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52770   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52771       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52772 
52773   # Executable flags
52774   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52775   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52776 
52777 
52778 
52779 
52780 
52781 
52782   # Setup LDFLAGS et al.
52783   #
52784 
52785   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52786     LDFLAGS_MICROSOFT="-nologo -opt:ref"
52787     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52788     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52789     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52790       LDFLAGS_SAFESH="-safeseh"
52791       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52792       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52793       # NOTE: Old build added -machine. Probably not needed.
52794       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52795     else
52796       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52797     fi
52798   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52799       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52800       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52801         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52802         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52803     fi
52804   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52805     # If this is a --hash-style=gnu system, use --hash-style=both, why?
52806     # We have previously set HAS_GNU_HASH if this is the case
52807     if test -n "$HAS_GNU_HASH"; then
52808       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52809       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52810       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52811     fi
52812       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52813         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52814     fi
52815     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52816       # And since we now know that the linker is gnu, then add -z defs, to forbid
52817       # undefined symbols in object files.
52818       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52819       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52820       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52821       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52822       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52823       if test "x$OPENJDK_BUILD_CPU" = xx86; then
52824         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52825       fi
52826       case $DEBUG_LEVEL in
52827         release )
52828           # tell linker to optimize libraries.
52829           # Should this be supplied to the OSS linker as well?
52830           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52831           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52832           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52833           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52834             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52835           fi
52836           ;;
52837         slowdebug )
52838           # Hotspot always let the linker optimize
52839           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52840           if test "x$HAS_LINKER_NOW" = "xtrue"; then
52841             # do relocations at load
52842             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52843             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52844             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52845           fi
52846           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52847             # mark relocations read only
52848             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52849             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52850             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52851           fi
52852           ;;
52853         fastdebug )
52854           # Hotspot always let the linker optimize
52855           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52856           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52857             # mark relocations read only
52858             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52859             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52860             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52861           fi
52862           ;;
52863         * )
52864           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52865           ;;
52866         esac
52867     fi
52868   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52869     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52870     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52871     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52872     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52873     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52874     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52875       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52876     fi
52877   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52878     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52879     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52880     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52881     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52882     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52883     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52884     if test "x$DEBUG_LEVEL" = xslowdebug; then
52885       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
52886     fi
52887   fi
52888 
52889   # Customize LDFLAGS for executables
52890 
52891   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52892 
52893   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52894     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52895       LDFLAGS_STACK_SIZE=1048576
52896     else
52897       LDFLAGS_STACK_SIZE=327680
52898     fi
52899     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52900   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52901     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52902   fi
52903 
52904   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52905 
52906   # Customize LDFLAGS for libs
52907   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52908 
52909   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52910   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${LDFLAGS_NO_EXEC_STACK}"
52911   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52912     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52913         -libpath:${OUTPUTDIR}/support/modules_libs/java.base"
52914     OPENJDK_BUILD_JDKLIB_LIBS=""
52915   else
52916     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52917         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52918 
52919     if test "xBUILD" = "xTARGET"; then
52920       # On some platforms (mac) the linker warns about non existing -L dirs.
52921       # For any of the variants server, client or minimal, the dir matches the
52922       # variant name. The "main" variant should be used for linking. For the
52923       # rest, the dir is just server.
52924       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52925           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52926         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52927             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52928       else
52929         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52930             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52931       fi
52932     elif test "xBUILD" = "xBUILD"; then
52933       # When building a buildjdk, it's always only the server variant
52934       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52935           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52936     fi
52937 
52938     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52939     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52940       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52941     fi
52942 
52943   fi
52944 
52945 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52946 
52947   # Set OPENJDK_BUILD_JVM_LIBS (per os)
52948   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52949     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52950   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52951     # FIXME: This hard-coded path is not really proper.
52952     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52953       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52954     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52955       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52956     fi
52957     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52958         -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52959   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52960     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52961   elif test "x$OPENJDK_BUILD_OS" = xaix; then
52962     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52963   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52964     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52965   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52966     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52967         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52968         wsock32.lib winmm.lib version.lib psapi.lib"
52969     fi
52970 
52971   # Set OPENJDK_BUILD_JVM_ASFLAGS
52972   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52973     if test "x$OPENJDK_BUILD_CPU" = xx86; then
52974       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52975     fi
52976   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52977     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52978   fi
52979 
52980   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52981 
52982 
52983 
52984 
52985 
52986 
52987 
52988 
52989 
52990 
52991 
52992 
52993 
52994 
52995 
52996 
52997   # Tests are only ever compiled for TARGET
52998   # Flags for compiling test libraries
52999   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
53000   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
53001 
53002   # Flags for compiling test executables
53003   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
53004   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
53005 
53006 
53007 
53008 
53009 
53010 
53011   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
53012   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
53013 
53014 
53015 
53016 
53017 
53018 
53019   # Check that the compiler supports -mX (or -qX on AIX) flags
53020   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
53021 
53022 
53023 
53024 
53025 
53026 
53027 
53028 
53029 
53030 
53031 
53032 
53033 
53034 
53035 
53036 
53037 
53038 
53039 
53040 
53041 
53042 
53043 
53044 
53045 
53046 
53047 
53048 
53049 
53050 
53051 
53052 
53053 
53054 
53055 
53056 
53057 
53058 
53059 
53060 
53061 
53062 
53063 
53064 
53065 
53066 
53067 
53068     # Execute function body
53069 
53070 
53071 
53072 
53073 
53074 
53075 
53076 
53077 
53078 
53079 
53080 
53081 
53082 
53083 
53084 
53085 
53086 
53087 
53088 
53089 
53090 
53091 
53092 
53093 
53094 
53095 
53096 
53097 
53098 
53099 
53100 
53101 
53102 
53103 
53104 
53105 
53106 
53107 
53108 
53109 
53110 
53111 
53112 
53113 
53114 
53115 
53116 
53117     # Execute function body
53118 
53119   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53120 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53121   supports=yes
53122 
53123   saved_cflags="$CFLAGS"
53124   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53125   ac_ext=c
53126 ac_cpp='$CPP $CPPFLAGS'
53127 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53128 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53129 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53130 
53131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53132 /* end confdefs.h.  */
53133 int i;
53134 _ACEOF
53135 if ac_fn_c_try_compile "$LINENO"; then :
53136 
53137 else
53138   supports=no
53139 fi
53140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53141   ac_ext=cpp
53142 ac_cpp='$CXXCPP $CPPFLAGS'
53143 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53144 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53145 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53146 
53147   CFLAGS="$saved_cflags"
53148 
53149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53150 $as_echo "$supports" >&6; }
53151   if test "x$supports" = "xyes" ; then
53152     :
53153     C_COMP_SUPPORTS="yes"
53154   else
53155     :
53156     C_COMP_SUPPORTS="no"
53157   fi
53158 
53159 
53160 
53161 
53162 
53163 
53164 
53165 
53166 
53167 
53168 
53169 
53170 
53171 
53172 
53173 
53174 
53175 
53176 
53177 
53178 
53179 
53180 
53181 
53182 
53183 
53184 
53185 
53186 
53187 
53188 
53189 
53190 
53191 
53192 
53193 
53194 
53195 
53196 
53197 
53198 
53199 
53200 
53201 
53202 
53203 
53204 
53205 
53206 
53207 
53208 
53209 
53210 
53211 
53212 
53213 
53214 
53215 
53216 
53217     # Execute function body
53218 
53219   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53220 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53221   supports=yes
53222 
53223   saved_cxxflags="$CXXFLAGS"
53224   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53225   ac_ext=cpp
53226 ac_cpp='$CXXCPP $CPPFLAGS'
53227 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53228 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53229 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53230 
53231   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53232 /* end confdefs.h.  */
53233 int i;
53234 _ACEOF
53235 if ac_fn_cxx_try_compile "$LINENO"; then :
53236 
53237 else
53238   supports=no
53239 fi
53240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53241   ac_ext=cpp
53242 ac_cpp='$CXXCPP $CPPFLAGS'
53243 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53244 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53245 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53246 
53247   CXXFLAGS="$saved_cxxflags"
53248 
53249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53250 $as_echo "$supports" >&6; }
53251   if test "x$supports" = "xyes" ; then
53252     :
53253     CXX_COMP_SUPPORTS="yes"
53254   else
53255     :
53256     CXX_COMP_SUPPORTS="no"
53257   fi
53258 
53259 
53260 
53261 
53262 
53263 
53264 
53265 
53266 
53267 
53268 
53269 
53270 
53271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53272 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53273   supports=no
53274   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53275 
53276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53277 $as_echo "$supports" >&6; }
53278   if test "x$supports" = "xyes" ; then
53279     :
53280     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
53281   else
53282     :
53283     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
53284   fi
53285 
53286 
53287 
53288 
53289 
53290 
53291 
53292 
53293   # Check whether --enable-warnings-as-errors was given.
53294 if test "${enable_warnings_as_errors+set}" = set; then :
53295   enableval=$enable_warnings_as_errors;
53296 fi
53297 
53298 
53299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53300 $as_echo_n "checking if native warnings are errors... " >&6; }
53301   if test "x$enable_warnings_as_errors" = "xyes"; then
53302     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53303 $as_echo "yes (explicitly set)" >&6; }
53304     WARNINGS_AS_ERRORS=true
53305   elif test "x$enable_warnings_as_errors" = "xno"; then
53306     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53307 $as_echo "no" >&6; }
53308     WARNINGS_AS_ERRORS=false
53309   elif test "x$enable_warnings_as_errors" = "x"; then
53310     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53311 $as_echo "yes (default)" >&6; }
53312     WARNINGS_AS_ERRORS=true
53313   else
53314     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53315   fi
53316 
53317 
53318 
53319   case "${TOOLCHAIN_TYPE}" in
53320     microsoft)
53321       DISABLE_WARNING_PREFIX="-wd"
53322       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53323       ;;
53324     solstudio)
53325       DISABLE_WARNING_PREFIX="-erroff="
53326       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53327       ;;
53328     gcc)
53329       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53330 
53331 
53332 
53333 
53334 
53335 
53336 
53337 
53338 
53339 
53340 
53341 
53342 
53343 
53344 
53345 
53346 
53347 
53348 
53349 
53350 
53351 
53352 
53353 
53354 
53355 
53356 
53357 
53358 
53359 
53360 
53361 
53362 
53363 
53364 
53365 
53366 
53367 
53368 
53369 
53370 
53371 
53372 
53373 
53374 
53375 
53376 
53377     # Execute function body
53378 
53379 
53380 
53381 
53382 
53383 
53384 
53385 
53386 
53387 
53388 
53389 
53390 
53391 
53392 
53393 
53394 
53395 
53396 
53397 
53398 
53399 
53400 
53401 
53402 
53403 
53404 
53405 
53406 
53407 
53408 
53409 
53410 
53411 
53412 
53413 
53414 
53415 
53416 
53417 
53418 
53419 
53420 
53421 
53422 
53423 
53424 
53425 
53426     # Execute function body
53427 
53428   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53429 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53430   supports=yes
53431 
53432   saved_cflags="$CFLAGS"
53433   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53434   ac_ext=c
53435 ac_cpp='$CPP $CPPFLAGS'
53436 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53437 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53438 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53439 
53440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53441 /* end confdefs.h.  */
53442 int i;
53443 _ACEOF
53444 if ac_fn_c_try_compile "$LINENO"; then :
53445 
53446 else
53447   supports=no
53448 fi
53449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53450   ac_ext=cpp
53451 ac_cpp='$CXXCPP $CPPFLAGS'
53452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53453 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53455 
53456   CFLAGS="$saved_cflags"
53457 
53458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53459 $as_echo "$supports" >&6; }
53460   if test "x$supports" = "xyes" ; then
53461     :
53462     C_COMP_SUPPORTS="yes"
53463   else
53464     :
53465     C_COMP_SUPPORTS="no"
53466   fi
53467 
53468 
53469 
53470 
53471 
53472 
53473 
53474 
53475 
53476 
53477 
53478 
53479 
53480 
53481 
53482 
53483 
53484 
53485 
53486 
53487 
53488 
53489 
53490 
53491 
53492 
53493 
53494 
53495 
53496 
53497 
53498 
53499 
53500 
53501 
53502 
53503 
53504 
53505 
53506 
53507 
53508 
53509 
53510 
53511 
53512 
53513 
53514 
53515 
53516 
53517 
53518 
53519 
53520 
53521 
53522 
53523 
53524 
53525 
53526     # Execute function body
53527 
53528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53529 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53530   supports=yes
53531 
53532   saved_cxxflags="$CXXFLAGS"
53533   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53534   ac_ext=cpp
53535 ac_cpp='$CXXCPP $CPPFLAGS'
53536 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53537 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53538 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53539 
53540   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53541 /* end confdefs.h.  */
53542 int i;
53543 _ACEOF
53544 if ac_fn_cxx_try_compile "$LINENO"; then :
53545 
53546 else
53547   supports=no
53548 fi
53549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53550   ac_ext=cpp
53551 ac_cpp='$CXXCPP $CPPFLAGS'
53552 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53553 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53554 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53555 
53556   CXXFLAGS="$saved_cxxflags"
53557 
53558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53559 $as_echo "$supports" >&6; }
53560   if test "x$supports" = "xyes" ; then
53561     :
53562     CXX_COMP_SUPPORTS="yes"
53563   else
53564     :
53565     CXX_COMP_SUPPORTS="no"
53566   fi
53567 
53568 
53569 
53570 
53571 
53572 
53573 
53574 
53575 
53576 
53577 
53578 
53579 
53580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53581 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53582   supports=no
53583   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53584 
53585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53586 $as_echo "$supports" >&6; }
53587   if test "x$supports" = "xyes" ; then
53588     :
53589     GCC_CAN_DISABLE_WARNINGS=true
53590   else
53591     :
53592     GCC_CAN_DISABLE_WARNINGS=false
53593 
53594   fi
53595 
53596 
53597 
53598 
53599 
53600 
53601       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53602         DISABLE_WARNING_PREFIX="-Wno-"
53603       else
53604         DISABLE_WARNING_PREFIX=
53605       fi
53606       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53607       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53608       # CFLAGS since any target specific flags will likely not work with the
53609       # build compiler
53610       CC_OLD="$CC"
53611       CXX_OLD="$CXX"
53612       CC="$BUILD_CC"
53613       CXX="$BUILD_CXX"
53614       CFLAGS_OLD="$CFLAGS"
53615       CFLAGS=""
53616 
53617 
53618 
53619 
53620 
53621 
53622 
53623 
53624 
53625 
53626 
53627 
53628 
53629 
53630 
53631 
53632 
53633 
53634 
53635 
53636 
53637 
53638 
53639 
53640 
53641 
53642 
53643 
53644 
53645 
53646 
53647 
53648 
53649 
53650 
53651 
53652 
53653 
53654 
53655 
53656 
53657 
53658 
53659 
53660 
53661 
53662 
53663     # Execute function body
53664 
53665 
53666 
53667 
53668 
53669 
53670 
53671 
53672 
53673 
53674 
53675 
53676 
53677 
53678 
53679 
53680 
53681 
53682 
53683 
53684 
53685 
53686 
53687 
53688 
53689 
53690 
53691 
53692 
53693 
53694 
53695 
53696 
53697 
53698 
53699 
53700 
53701 
53702 
53703 
53704 
53705 
53706 
53707 
53708 
53709 
53710 
53711 
53712     # Execute function body
53713 
53714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53715 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53716   supports=yes
53717 
53718   saved_cflags="$CFLAGS"
53719   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53720   ac_ext=c
53721 ac_cpp='$CPP $CPPFLAGS'
53722 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53723 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53724 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53725 
53726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53727 /* end confdefs.h.  */
53728 int i;
53729 _ACEOF
53730 if ac_fn_c_try_compile "$LINENO"; then :
53731 
53732 else
53733   supports=no
53734 fi
53735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53736   ac_ext=cpp
53737 ac_cpp='$CXXCPP $CPPFLAGS'
53738 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53739 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53740 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53741 
53742   CFLAGS="$saved_cflags"
53743 
53744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53745 $as_echo "$supports" >&6; }
53746   if test "x$supports" = "xyes" ; then
53747     :
53748     C_COMP_SUPPORTS="yes"
53749   else
53750     :
53751     C_COMP_SUPPORTS="no"
53752   fi
53753 
53754 
53755 
53756 
53757 
53758 
53759 
53760 
53761 
53762 
53763 
53764 
53765 
53766 
53767 
53768 
53769 
53770 
53771 
53772 
53773 
53774 
53775 
53776 
53777 
53778 
53779 
53780 
53781 
53782 
53783 
53784 
53785 
53786 
53787 
53788 
53789 
53790 
53791 
53792 
53793 
53794 
53795 
53796 
53797 
53798 
53799 
53800 
53801 
53802 
53803 
53804 
53805 
53806 
53807 
53808 
53809 
53810 
53811 
53812     # Execute function body
53813 
53814   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53815 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53816   supports=yes
53817 
53818   saved_cxxflags="$CXXFLAGS"
53819   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53820   ac_ext=cpp
53821 ac_cpp='$CXXCPP $CPPFLAGS'
53822 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53823 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53824 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53825 
53826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53827 /* end confdefs.h.  */
53828 int i;
53829 _ACEOF
53830 if ac_fn_cxx_try_compile "$LINENO"; then :
53831 
53832 else
53833   supports=no
53834 fi
53835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53836   ac_ext=cpp
53837 ac_cpp='$CXXCPP $CPPFLAGS'
53838 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53839 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53840 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53841 
53842   CXXFLAGS="$saved_cxxflags"
53843 
53844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53845 $as_echo "$supports" >&6; }
53846   if test "x$supports" = "xyes" ; then
53847     :
53848     CXX_COMP_SUPPORTS="yes"
53849   else
53850     :
53851     CXX_COMP_SUPPORTS="no"
53852   fi
53853 
53854 
53855 
53856 
53857 
53858 
53859 
53860 
53861 
53862 
53863 
53864 
53865 
53866   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53867 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53868   supports=no
53869   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53870 
53871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53872 $as_echo "$supports" >&6; }
53873   if test "x$supports" = "xyes" ; then
53874     :
53875     BUILD_CC_CAN_DISABLE_WARNINGS=true
53876   else
53877     :
53878     BUILD_CC_CAN_DISABLE_WARNINGS=false
53879 
53880   fi
53881 
53882 
53883 
53884 
53885 
53886 
53887       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53888         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53889       else
53890         BUILD_CC_DISABLE_WARNING_PREFIX=
53891       fi
53892       CC="$CC_OLD"
53893       CXX="$CXX_OLD"
53894       CFLAGS="$CFLAGS_OLD"
53895       ;;
53896     clang)
53897       DISABLE_WARNING_PREFIX="-Wno-"
53898       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53899       ;;
53900     xlc)
53901       DISABLE_WARNING_PREFIX="-qsuppress="
53902       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53903       ;;
53904   esac
53905 
53906 
53907 
53908 
53909 
53910 # Setup debug symbols (need objcopy from the toolchain for that)
53911 
53912   #
53913   # NATIVE_DEBUG_SYMBOLS
53914   # This must be done after the toolchain is setup, since we're looking at objcopy.
53915   #
53916   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53917 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
53918 
53919 # Check whether --with-native-debug-symbols was given.
53920 if test "${with_native_debug_symbols+set}" = set; then :
53921   withval=$with_native_debug_symbols;
53922         if test "x$OPENJDK_TARGET_OS" = xaix; then
53923           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53924             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53925           fi
53926         fi
53927 
53928 else
53929 
53930         if test "x$OPENJDK_TARGET_OS" = xaix; then
53931           # AIX doesn't support 'zipped' so use 'internal' as default
53932           with_native_debug_symbols="internal"
53933         else
53934           if test "x$STATIC_BUILD" = xtrue; then
53935             with_native_debug_symbols="none"
53936           else
53937             with_native_debug_symbols="zipped"
53938           fi
53939         fi
53940 
53941 fi
53942 
53943   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53945 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53946 
53947   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53948 
53949     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53950       if test "x$OBJCOPY" = x; then
53951         # enabling of enable-debug-symbols and can't find objcopy
53952         # this is an error
53953         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53954       fi
53955     fi
53956 
53957     COMPILE_WITH_DEBUG_SYMBOLS=true
53958     COPY_DEBUG_SYMBOLS=true
53959     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53960   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53961     COMPILE_WITH_DEBUG_SYMBOLS=false
53962     COPY_DEBUG_SYMBOLS=false
53963     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53964   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53965     COMPILE_WITH_DEBUG_SYMBOLS=true
53966     COPY_DEBUG_SYMBOLS=false
53967     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53968   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53969 
53970     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53971       if test "x$OBJCOPY" = x; then
53972         # enabling of enable-debug-symbols and can't find objcopy
53973         # this is an error
53974         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53975       fi
53976     fi
53977 
53978     COMPILE_WITH_DEBUG_SYMBOLS=true
53979     COPY_DEBUG_SYMBOLS=true
53980     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53981   else
53982     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53983   fi
53984 
53985   # --enable-debug-symbols is deprecated.
53986   # Please use --with-native-debug-symbols=[internal,external,zipped] .
53987 
53988   # Check whether --enable-debug-symbols was given.
53989 if test "${enable_debug_symbols+set}" = set; then :
53990   enableval=$enable_debug_symbols;
53991 fi
53992 
53993   if test "x$enable_debug_symbols" != x; then
53994     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53995 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53996 
53997     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53998       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53999 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
54000     fi
54001 
54002   fi
54003 
54004 
54005   # --enable-zip-debug-info is deprecated.
54006   # Please use --with-native-debug-symbols=zipped .
54007 
54008   # Check whether --enable-zip-debug-info was given.
54009 if test "${enable_zip_debug_info+set}" = set; then :
54010   enableval=$enable_zip_debug_info;
54011 fi
54012 
54013   if test "x$enable_zip_debug_info" != x; then
54014     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
54015 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
54016 
54017     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
54018       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
54019 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
54020     fi
54021 
54022   fi
54023 
54024 
54025 
54026 
54027 
54028 
54029 
54030   # Check whether --enable-native-coverage was given.
54031 if test "${enable_native_coverage+set}" = set; then :
54032   enableval=$enable_native_coverage;
54033 fi
54034 
54035   GCOV_ENABLED="false"
54036   if test "x$enable_native_coverage" = "xyes"; then
54037     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
54038       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54039 $as_echo_n "checking if native coverage is enabled... " >&6; }
54040       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54041 $as_echo "yes" >&6; }
54042       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
54043       GCOV_LDFLAGS="-fprofile-arcs"
54044       JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
54045       JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
54046       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
54047       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
54048       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
54049       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
54050       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
54051       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
54052       GCOV_ENABLED="true"
54053     else
54054       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
54055     fi
54056   elif test "x$enable_native_coverage" = "xno"; then
54057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54058 $as_echo_n "checking if native coverage is enabled... " >&6; }
54059     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54060 $as_echo "no" >&6; }
54061   elif test "x$enable_native_coverage" != "x"; then
54062     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
54063   fi
54064 
54065 
54066 
54067 
54068 # Need toolchain to setup dtrace
54069 
54070   # Test for dtrace dependencies
54071   # Check whether --enable-dtrace was given.
54072 if test "${enable_dtrace+set}" = set; then :
54073   enableval=$enable_dtrace;
54074 fi
54075 
54076 
54077   DTRACE_DEP_MISSING=false
54078 
54079   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
54080 $as_echo_n "checking for dtrace tool... " >&6; }
54081   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
54082     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
54083 $as_echo "$DTRACE" >&6; }
54084   else
54085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
54086 $as_echo "not found, cannot build dtrace" >&6; }
54087     DTRACE_DEP_MISSING=true
54088   fi
54089 
54090   for ac_header in sys/sdt.h
54091 do :
54092   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
54093 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
54094   cat >>confdefs.h <<_ACEOF
54095 #define HAVE_SYS_SDT_H 1
54096 _ACEOF
54097  DTRACE_HEADERS_OK=yes
54098 else
54099   DTRACE_HEADERS_OK=no
54100 fi
54101 
54102 done
54103 
54104   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
54105     DTRACE_DEP_MISSING=true
54106   fi
54107 
54108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
54109 $as_echo_n "checking if dtrace should be built... " >&6; }
54110   if test "x$enable_dtrace" = "xyes"; then
54111     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54112       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54113 $as_echo "no, missing dependencies" >&6; }
54114 
54115   # Print a helpful message on how to acquire the necessary build dependency.
54116   # dtrace is the help tag: freetype, cups, alsa etc
54117   MISSING_DEPENDENCY=dtrace
54118 
54119   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54120     cygwin_help $MISSING_DEPENDENCY
54121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54122     msys_help $MISSING_DEPENDENCY
54123   else
54124     PKGHANDLER_COMMAND=
54125 
54126     case $PKGHANDLER in
54127       apt-get)
54128         apt_help     $MISSING_DEPENDENCY ;;
54129       yum)
54130         yum_help     $MISSING_DEPENDENCY ;;
54131       brew)
54132         brew_help    $MISSING_DEPENDENCY ;;
54133       port)
54134         port_help    $MISSING_DEPENDENCY ;;
54135       pkgutil)
54136         pkgutil_help $MISSING_DEPENDENCY ;;
54137       pkgadd)
54138         pkgadd_help  $MISSING_DEPENDENCY ;;
54139     esac
54140 
54141     if test "x$PKGHANDLER_COMMAND" != x; then
54142       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54143     fi
54144   fi
54145 
54146       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
54147     else
54148       INCLUDE_DTRACE=true
54149       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54150 $as_echo "yes, forced" >&6; }
54151     fi
54152   elif test "x$enable_dtrace" = "xno"; then
54153     INCLUDE_DTRACE=false
54154     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54155 $as_echo "no, forced" >&6; }
54156   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
54157     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54158       INCLUDE_DTRACE=false
54159       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54160 $as_echo "no, missing dependencies" >&6; }
54161     else
54162       INCLUDE_DTRACE=true
54163       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
54164 $as_echo "yes, dependencies present" >&6; }
54165     fi
54166   else
54167     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
54168   fi
54169 
54170 
54171   # Check whether --enable-aot was given.
54172 if test "${enable_aot+set}" = set; then :
54173   enableval=$enable_aot;
54174 fi
54175 
54176 
54177   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
54178     ENABLE_AOT="true"
54179   elif test "x$enable_aot" = "xyes"; then
54180     ENABLE_AOT="true"
54181   elif test "x$enable_aot" = "xno"; then
54182     ENABLE_AOT="false"
54183     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
54184 $as_echo_n "checking if aot should be enabled... " >&6; }
54185     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54186 $as_echo "no, forced" >&6; }
54187   else
54188     as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
54189   fi
54190 
54191   if test "x$ENABLE_AOT" = "xtrue"; then
54192     # Only enable AOT on X64 platforms.
54193     if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
54194       if test -e "${TOPDIR}/src/jdk.aot"; then
54195         if test -e "${TOPDIR}/src/jdk.internal.vm.compiler"; then
54196           ENABLE_AOT="true"
54197         else
54198           ENABLE_AOT="false"
54199           if test "x$enable_aot" = "xyes"; then
54200             as_fn_error $? "Cannot build AOT without src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
54201           fi
54202         fi
54203       else
54204         ENABLE_AOT="false"
54205         if test "x$enable_aot" = "xyes"; then
54206           as_fn_error $? "Cannot build AOT without src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
54207         fi
54208       fi
54209     else
54210       ENABLE_AOT="false"
54211       if test "x$enable_aot" = "xyes"; then
54212         as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
54213       fi
54214     fi
54215   fi
54216 
54217 
54218 
54219 
54220   # Check whether --enable-cds was given.
54221 if test "${enable_cds+set}" = set; then :
54222   enableval=$enable_cds;
54223 fi
54224 
54225 
54226   if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then
54227     ENABLE_CDS="true"
54228   elif test "x$enable_cds" = "xno"; then
54229     ENABLE_CDS="false"
54230   else
54231     as_fn_error $? "Invalid value for --enable-cds: $enable_cds" "$LINENO" 5
54232   fi
54233 
54234 
54235 
54236 
54237   # Check whether --enable-hotspot-gtest was given.
54238 if test "${enable_hotspot_gtest+set}" = set; then :
54239   enableval=$enable_hotspot_gtest;
54240 fi
54241 
54242 
54243   if test -e "${TOPDIR}/test/hotspot/gtest"; then
54244     GTEST_DIR_EXISTS="true"
54245   else
54246     GTEST_DIR_EXISTS="false"
54247   fi
54248 
54249   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
54250 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
54251   if test "x$enable_hotspot_gtest" = "xyes"; then
54252     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54253       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54254 $as_echo "yes, forced" >&6; }
54255       BUILD_GTEST="true"
54256     else
54257       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
54258     fi
54259   elif test "x$enable_hotspot_gtest" = "xno"; then
54260     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54261 $as_echo "no, forced" >&6; }
54262     BUILD_GTEST="false"
54263   elif test "x$enable_hotspot_gtest" = "x"; then
54264     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54265       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54266 $as_echo "yes" >&6; }
54267       BUILD_GTEST="true"
54268     else
54269       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54270 $as_echo "no" >&6; }
54271       BUILD_GTEST="false"
54272     fi
54273   else
54274     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
54275   fi
54276 
54277 
54278 
54279 
54280 ###############################################################################
54281 #
54282 # Check dependencies for external and internal libraries.
54283 #
54284 ###############################################################################
54285 
54286 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
54287 
54288   # When using cygwin or msys, we need a wrapper binary that renames
54289   # /cygdrive/c/ arguments into c:/ arguments and peeks into
54290   # @files and rewrites these too! This wrapper binary is
54291   # called fixpath.
54292   FIXPATH=
54293   if test "x$OPENJDK_BUILD_OS" = xwindows; then
54294     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
54295 $as_echo_n "checking if fixpath can be created... " >&6; }
54296     FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
54297     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
54298     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
54299     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
54300       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
54301       FIXPATH="$FIXPATH_BIN -c"
54302     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
54303       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
54304       # @ was chosen as separator to minimize risk of other tools messing around with it
54305       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
54306           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
54307       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
54308       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
54309     fi
54310     FIXPATH_SRC_W="$FIXPATH_SRC"
54311     FIXPATH_BIN_W="$FIXPATH_BIN"
54312 
54313   unix_path="$FIXPATH_SRC_W"
54314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54315     windows_path=`$CYGPATH -m "$unix_path"`
54316     FIXPATH_SRC_W="$windows_path"
54317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54318     windows_path=`cmd //c echo $unix_path`
54319     FIXPATH_SRC_W="$windows_path"
54320   fi
54321 
54322 
54323   unix_path="$FIXPATH_BIN_W"
54324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54325     windows_path=`$CYGPATH -m "$unix_path"`
54326     FIXPATH_BIN_W="$windows_path"
54327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54328     windows_path=`cmd //c echo $unix_path`
54329     FIXPATH_BIN_W="$windows_path"
54330   fi
54331 
54332     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54333     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54334     cd $FIXPATH_DIR
54335     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54336     cd $CURDIR
54337 
54338     if test ! -x $FIXPATH_BIN; then
54339       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54340 $as_echo "no" >&6; }
54341       cat $FIXPATH_DIR/fixpath1.log
54342       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54343     fi
54344     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54345 $as_echo "yes" >&6; }
54346     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54347 $as_echo_n "checking if fixpath.exe works... " >&6; }
54348     cd $FIXPATH_DIR
54349     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54350         > $FIXPATH_DIR/fixpath2.log 2>&1
54351     cd $CURDIR
54352     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54353       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54354 $as_echo "no" >&6; }
54355       cat $FIXPATH_DIR/fixpath2.log
54356       as_fn_error $? "fixpath did not work!" "$LINENO" 5
54357     fi
54358     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54359 $as_echo "yes" >&6; }
54360 
54361     FIXPATH_DETACH_FLAG="--detach"
54362   fi
54363 
54364 
54365 
54366 
54367 
54368 
54369   # Check if X11 is needed
54370   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54371     # No X11 support on windows or macosx
54372     NEEDS_LIB_X11=false
54373   else
54374     # All other instances need X11, even if building headless only, libawt still
54375     # needs X11 headers.
54376     NEEDS_LIB_X11=true
54377   fi
54378 
54379   # Check if cups is needed
54380   if test "x$OPENJDK_TARGET_OS" = xwindows; then
54381     # Windows have a separate print system
54382     NEEDS_LIB_CUPS=false
54383   else
54384     NEEDS_LIB_CUPS=true
54385   fi
54386 
54387   # A custom hook may have set this already
54388   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54389     NEEDS_LIB_FREETYPE=true
54390   fi
54391 
54392   # Check if alsa is needed
54393   if test "x$OPENJDK_TARGET_OS" = xlinux; then
54394     NEEDS_LIB_ALSA=true
54395   else
54396     NEEDS_LIB_ALSA=false
54397   fi
54398 
54399   # Check if ffi is needed
54400   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54401     NEEDS_LIB_FFI=true
54402   else
54403     NEEDS_LIB_FFI=false
54404   fi
54405 
54406 
54407   # statically link libstdc++ before C++ ABI is stablized on Linux unless
54408   # dynamic build is configured on command line.
54409 
54410 # Check whether --with-stdc++lib was given.
54411 if test "${with_stdc__lib+set}" = set; then :
54412   withval=$with_stdc__lib;
54413         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54414                 && test "x$with_stdc__lib" != xdefault; then
54415           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54416         fi
54417 
54418 else
54419   with_stdc__lib=default
54420 
54421 fi
54422 
54423 
54424   if test "x$OPENJDK_TARGET_OS" = xlinux; then
54425     # Test if stdc++ can be linked statically.
54426     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54427 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54428     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54429     ac_ext=cpp
54430 ac_cpp='$CXXCPP $CPPFLAGS'
54431 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54432 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54433 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54434 
54435     OLD_LIBS="$LIBS"
54436     LIBS="$STATIC_STDCXX_FLAGS"
54437     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54438 /* end confdefs.h.  */
54439 
54440 int
54441 main ()
54442 {
54443 return 0;
54444   ;
54445   return 0;
54446 }
54447 _ACEOF
54448 if ac_fn_cxx_try_link "$LINENO"; then :
54449   has_static_libstdcxx=yes
54450 else
54451   has_static_libstdcxx=no
54452 fi
54453 rm -f core conftest.err conftest.$ac_objext \
54454     conftest$ac_exeext conftest.$ac_ext
54455     LIBS="$OLD_LIBS"
54456     ac_ext=cpp
54457 ac_cpp='$CXXCPP $CPPFLAGS'
54458 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54459 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54460 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54461 
54462     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54463 $as_echo "$has_static_libstdcxx" >&6; }
54464 
54465     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54466       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54467     fi
54468 
54469     # If dynamic was requested, it's available since it would fail above otherwise.
54470     # If dynamic wasn't requested, go with static unless it isn't available.
54471     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54472 $as_echo_n "checking how to link with libstdc++... " >&6; }
54473     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54474         ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54475       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54476 $as_echo "dynamic" >&6; }
54477     else
54478       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54479       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54480       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54481       # just use the same setting as for the TARGET toolchain.
54482       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54483       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54484 $as_echo "static" >&6; }
54485     fi
54486   fi
54487 
54488   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54489   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54490     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54491   fi
54492 
54493 
54494 
54495   # Setup Windows runtime dlls
54496   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54497 
54498 
54499 # Check whether --with-msvcr-dll was given.
54500 if test "${with_msvcr_dll+set}" = set; then :
54501   withval=$with_msvcr_dll;
54502 fi
54503 
54504 
54505   if test "x$with_msvcr_dll" != x; then
54506     # If given explicitly by user, do not probe. If not present, fail directly.
54507 
54508   DLL_NAME="$MSVCR_NAME"
54509   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54510   METHOD="--with-msvcr-dll"
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     if test "x$MSVC_DLL" = x; then
54683       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54684     fi
54685     MSVCR_DLL="$MSVC_DLL"
54686   elif test "x$DEVKIT_MSVCR_DLL" != x; then
54687 
54688   DLL_NAME="$MSVCR_NAME"
54689   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54690   METHOD="devkit"
54691   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54692     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54693 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54694 
54695     # Need to check if the found msvcr is correct architecture
54696     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54697 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54698     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54699     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54700       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54701       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54702       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54703         CORRECT_MSVCR_ARCH="PE32 executable"
54704       else
54705         CORRECT_MSVCR_ARCH="PE32+ executable"
54706       fi
54707     else
54708       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54709         CORRECT_MSVCR_ARCH=386
54710       else
54711         CORRECT_MSVCR_ARCH=x86-64
54712       fi
54713     fi
54714     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54715       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54716 $as_echo "ok" >&6; }
54717       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54718 
54719   # Only process if variable expands to non-empty
54720 
54721   if test "x$MSVC_DLL" != x; then
54722     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54723 
54724   # Input might be given as Windows format, start by converting to
54725   # unix format.
54726   path="$MSVC_DLL"
54727   new_path=`$CYGPATH -u "$path"`
54728 
54729   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54730   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54731   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54732   # "foo.exe" is OK but "foo" is an error.
54733   #
54734   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54735   # It is also a way to make sure we got the proper file name for the real test later on.
54736   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54737   if test "x$test_shortpath" = x; then
54738     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54739 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54740     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54741   fi
54742 
54743   # Call helper function which possibly converts this using DOS-style short mode.
54744   # If so, the updated path is stored in $new_path.
54745 
54746   input_path="$new_path"
54747   # Check if we need to convert this using DOS-style short mode. If the path
54748   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54749   # take no chances and rewrite it.
54750   # Note: m4 eats our [], so we need to use [ and ] instead.
54751   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54752   if test "x$has_forbidden_chars" != x; then
54753     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54754     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54755     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54756     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54757       # Going to short mode and back again did indeed matter. Since short mode is
54758       # case insensitive, let's make it lowercase to improve readability.
54759       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54760       # Now convert it back to Unix-style (cygpath)
54761       input_path=`$CYGPATH -u "$shortmode_path"`
54762       new_path="$input_path"
54763     fi
54764   fi
54765 
54766   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54767   if test "x$test_cygdrive_prefix" = x; then
54768     # As a simple fix, exclude /usr/bin since it's not a real path.
54769     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54770       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54771       # a path prefixed by /cygdrive for fixpath to work.
54772       new_path="$CYGWIN_ROOT_PATH$input_path"
54773     fi
54774   fi
54775 
54776 
54777   if test "x$path" != "x$new_path"; then
54778     MSVC_DLL="$new_path"
54779     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54780 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54781   fi
54782 
54783     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54784 
54785   path="$MSVC_DLL"
54786   has_colon=`$ECHO $path | $GREP ^.:`
54787   new_path="$path"
54788   if test "x$has_colon" = x; then
54789     # Not in mixed or Windows style, start by that.
54790     new_path=`cmd //c echo $path`
54791   fi
54792 
54793 
54794   input_path="$new_path"
54795   # Check if we need to convert this using DOS-style short mode. If the path
54796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54797   # take no chances and rewrite it.
54798   # Note: m4 eats our [], so we need to use [ and ] instead.
54799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54800   if test "x$has_forbidden_chars" != x; then
54801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54802     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54803   fi
54804 
54805 
54806   windows_path="$new_path"
54807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54808     unix_path=`$CYGPATH -u "$windows_path"`
54809     new_path="$unix_path"
54810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54812     new_path="$unix_path"
54813   fi
54814 
54815   if test "x$path" != "x$new_path"; then
54816     MSVC_DLL="$new_path"
54817     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54818 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54819   fi
54820 
54821   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54822   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54823 
54824     else
54825       # We're on a unix platform. Hooray! :)
54826       path="$MSVC_DLL"
54827       has_space=`$ECHO "$path" | $GREP " "`
54828       if test "x$has_space" != x; then
54829         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54830 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54831         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54832       fi
54833 
54834       # Use eval to expand a potential ~
54835       eval path="$path"
54836       if test ! -f "$path" && test ! -d "$path"; then
54837         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54838       fi
54839 
54840       if test -d "$path"; then
54841         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54842       else
54843         dir="`$DIRNAME "$path"`"
54844         base="`$BASENAME "$path"`"
54845         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54846       fi
54847     fi
54848   fi
54849 
54850       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54851 $as_echo_n "checking for $DLL_NAME... " >&6; }
54852       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54853 $as_echo "$MSVC_DLL" >&6; }
54854     else
54855       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54856 $as_echo "incorrect, ignoring" >&6; }
54857       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54858 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54859     fi
54860   fi
54861 
54862     if test "x$MSVC_DLL" = x; then
54863       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54864     fi
54865     MSVCR_DLL="$MSVC_DLL"
54866   else
54867 
54868   DLL_NAME="${MSVCR_NAME}"
54869   MSVC_DLL=
54870 
54871   if test "x$MSVC_DLL" = x; then
54872     # Probe: Using well-known location from Visual Studio 10.0
54873     if test "x$VCINSTALLDIR" != x; then
54874       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54875 
54876   windows_path="$CYGWIN_VC_INSTALL_DIR"
54877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54878     unix_path=`$CYGPATH -u "$windows_path"`
54879     CYGWIN_VC_INSTALL_DIR="$unix_path"
54880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54882     CYGWIN_VC_INSTALL_DIR="$unix_path"
54883   fi
54884 
54885       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54886         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54887       else
54888         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54889       fi
54890       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54891 
54892   DLL_NAME="$DLL_NAME"
54893   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54894   METHOD="well-known location in VCINSTALLDIR"
54895   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54896     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54897 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54898 
54899     # Need to check if the found msvcr is correct architecture
54900     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54901 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54902     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54903     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54904       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54905       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54906       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54907         CORRECT_MSVCR_ARCH="PE32 executable"
54908       else
54909         CORRECT_MSVCR_ARCH="PE32+ executable"
54910       fi
54911     else
54912       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54913         CORRECT_MSVCR_ARCH=386
54914       else
54915         CORRECT_MSVCR_ARCH=x86-64
54916       fi
54917     fi
54918     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54919       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54920 $as_echo "ok" >&6; }
54921       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54922 
54923   # Only process if variable expands to non-empty
54924 
54925   if test "x$MSVC_DLL" != x; then
54926     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54927 
54928   # Input might be given as Windows format, start by converting to
54929   # unix format.
54930   path="$MSVC_DLL"
54931   new_path=`$CYGPATH -u "$path"`
54932 
54933   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54934   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54935   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54936   # "foo.exe" is OK but "foo" is an error.
54937   #
54938   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54939   # It is also a way to make sure we got the proper file name for the real test later on.
54940   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54941   if test "x$test_shortpath" = x; then
54942     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54943 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54944     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54945   fi
54946 
54947   # Call helper function which possibly converts this using DOS-style short mode.
54948   # If so, the updated path is stored in $new_path.
54949 
54950   input_path="$new_path"
54951   # Check if we need to convert this using DOS-style short mode. If the path
54952   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54953   # take no chances and rewrite it.
54954   # Note: m4 eats our [], so we need to use [ and ] instead.
54955   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54956   if test "x$has_forbidden_chars" != x; then
54957     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54958     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54959     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54960     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54961       # Going to short mode and back again did indeed matter. Since short mode is
54962       # case insensitive, let's make it lowercase to improve readability.
54963       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54964       # Now convert it back to Unix-style (cygpath)
54965       input_path=`$CYGPATH -u "$shortmode_path"`
54966       new_path="$input_path"
54967     fi
54968   fi
54969 
54970   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54971   if test "x$test_cygdrive_prefix" = x; then
54972     # As a simple fix, exclude /usr/bin since it's not a real path.
54973     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54974       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54975       # a path prefixed by /cygdrive for fixpath to work.
54976       new_path="$CYGWIN_ROOT_PATH$input_path"
54977     fi
54978   fi
54979 
54980 
54981   if test "x$path" != "x$new_path"; then
54982     MSVC_DLL="$new_path"
54983     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54984 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54985   fi
54986 
54987     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54988 
54989   path="$MSVC_DLL"
54990   has_colon=`$ECHO $path | $GREP ^.:`
54991   new_path="$path"
54992   if test "x$has_colon" = x; then
54993     # Not in mixed or Windows style, start by that.
54994     new_path=`cmd //c echo $path`
54995   fi
54996 
54997 
54998   input_path="$new_path"
54999   # Check if we need to convert this using DOS-style short mode. If the path
55000   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55001   # take no chances and rewrite it.
55002   # Note: m4 eats our [], so we need to use [ and ] instead.
55003   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55004   if test "x$has_forbidden_chars" != x; then
55005     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55006     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55007   fi
55008 
55009 
55010   windows_path="$new_path"
55011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55012     unix_path=`$CYGPATH -u "$windows_path"`
55013     new_path="$unix_path"
55014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55015     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55016     new_path="$unix_path"
55017   fi
55018 
55019   if test "x$path" != "x$new_path"; then
55020     MSVC_DLL="$new_path"
55021     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55022 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55023   fi
55024 
55025   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55026   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55027 
55028     else
55029       # We're on a unix platform. Hooray! :)
55030       path="$MSVC_DLL"
55031       has_space=`$ECHO "$path" | $GREP " "`
55032       if test "x$has_space" != x; then
55033         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55034 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55035         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55036       fi
55037 
55038       # Use eval to expand a potential ~
55039       eval path="$path"
55040       if test ! -f "$path" && test ! -d "$path"; then
55041         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55042       fi
55043 
55044       if test -d "$path"; then
55045         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55046       else
55047         dir="`$DIRNAME "$path"`"
55048         base="`$BASENAME "$path"`"
55049         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55050       fi
55051     fi
55052   fi
55053 
55054       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55055 $as_echo_n "checking for $DLL_NAME... " >&6; }
55056       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55057 $as_echo "$MSVC_DLL" >&6; }
55058     else
55059       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55060 $as_echo "incorrect, ignoring" >&6; }
55061       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55062 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55063     fi
55064   fi
55065 
55066     fi
55067   fi
55068 
55069   if test "x$MSVC_DLL" = x; then
55070     # Probe: Check in the Boot JDK directory.
55071     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55072 
55073   DLL_NAME="$DLL_NAME"
55074   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55075   METHOD="well-known location in Boot JDK"
55076   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55077     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55078 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55079 
55080     # Need to check if the found msvcr is correct architecture
55081     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55082 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55083     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55084     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55085       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55086       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55087       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55088         CORRECT_MSVCR_ARCH="PE32 executable"
55089       else
55090         CORRECT_MSVCR_ARCH="PE32+ executable"
55091       fi
55092     else
55093       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55094         CORRECT_MSVCR_ARCH=386
55095       else
55096         CORRECT_MSVCR_ARCH=x86-64
55097       fi
55098     fi
55099     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55100       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55101 $as_echo "ok" >&6; }
55102       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55103 
55104   # Only process if variable expands to non-empty
55105 
55106   if test "x$MSVC_DLL" != x; then
55107     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55108 
55109   # Input might be given as Windows format, start by converting to
55110   # unix format.
55111   path="$MSVC_DLL"
55112   new_path=`$CYGPATH -u "$path"`
55113 
55114   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55115   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55116   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55117   # "foo.exe" is OK but "foo" is an error.
55118   #
55119   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55120   # It is also a way to make sure we got the proper file name for the real test later on.
55121   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55122   if test "x$test_shortpath" = x; then
55123     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55124 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55125     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55126   fi
55127 
55128   # Call helper function which possibly converts this using DOS-style short mode.
55129   # If so, the updated path is stored in $new_path.
55130 
55131   input_path="$new_path"
55132   # Check if we need to convert this using DOS-style short mode. If the path
55133   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55134   # take no chances and rewrite it.
55135   # Note: m4 eats our [], so we need to use [ and ] instead.
55136   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55137   if test "x$has_forbidden_chars" != x; then
55138     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55139     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55140     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55141     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55142       # Going to short mode and back again did indeed matter. Since short mode is
55143       # case insensitive, let's make it lowercase to improve readability.
55144       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55145       # Now convert it back to Unix-style (cygpath)
55146       input_path=`$CYGPATH -u "$shortmode_path"`
55147       new_path="$input_path"
55148     fi
55149   fi
55150 
55151   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55152   if test "x$test_cygdrive_prefix" = x; then
55153     # As a simple fix, exclude /usr/bin since it's not a real path.
55154     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55155       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55156       # a path prefixed by /cygdrive for fixpath to work.
55157       new_path="$CYGWIN_ROOT_PATH$input_path"
55158     fi
55159   fi
55160 
55161 
55162   if test "x$path" != "x$new_path"; then
55163     MSVC_DLL="$new_path"
55164     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55165 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55166   fi
55167 
55168     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55169 
55170   path="$MSVC_DLL"
55171   has_colon=`$ECHO $path | $GREP ^.:`
55172   new_path="$path"
55173   if test "x$has_colon" = x; then
55174     # Not in mixed or Windows style, start by that.
55175     new_path=`cmd //c echo $path`
55176   fi
55177 
55178 
55179   input_path="$new_path"
55180   # Check if we need to convert this using DOS-style short mode. If the path
55181   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55182   # take no chances and rewrite it.
55183   # Note: m4 eats our [], so we need to use [ and ] instead.
55184   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55185   if test "x$has_forbidden_chars" != x; then
55186     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55187     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55188   fi
55189 
55190 
55191   windows_path="$new_path"
55192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55193     unix_path=`$CYGPATH -u "$windows_path"`
55194     new_path="$unix_path"
55195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55196     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55197     new_path="$unix_path"
55198   fi
55199 
55200   if test "x$path" != "x$new_path"; then
55201     MSVC_DLL="$new_path"
55202     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55203 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55204   fi
55205 
55206   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55207   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55208 
55209     else
55210       # We're on a unix platform. Hooray! :)
55211       path="$MSVC_DLL"
55212       has_space=`$ECHO "$path" | $GREP " "`
55213       if test "x$has_space" != x; then
55214         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55215 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55216         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55217       fi
55218 
55219       # Use eval to expand a potential ~
55220       eval path="$path"
55221       if test ! -f "$path" && test ! -d "$path"; then
55222         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55223       fi
55224 
55225       if test -d "$path"; then
55226         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55227       else
55228         dir="`$DIRNAME "$path"`"
55229         base="`$BASENAME "$path"`"
55230         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55231       fi
55232     fi
55233   fi
55234 
55235       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55236 $as_echo_n "checking for $DLL_NAME... " >&6; }
55237       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55238 $as_echo "$MSVC_DLL" >&6; }
55239     else
55240       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55241 $as_echo "incorrect, ignoring" >&6; }
55242       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55243 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55244     fi
55245   fi
55246 
55247   fi
55248 
55249   if test "x$MSVC_DLL" = x; then
55250     # Probe: Look in the Windows system32 directory
55251     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55252 
55253   windows_path="$CYGWIN_SYSTEMROOT"
55254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55255     unix_path=`$CYGPATH -u "$windows_path"`
55256     CYGWIN_SYSTEMROOT="$unix_path"
55257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55259     CYGWIN_SYSTEMROOT="$unix_path"
55260   fi
55261 
55262     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55263 
55264   DLL_NAME="$DLL_NAME"
55265   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55266   METHOD="well-known location in SYSTEMROOT"
55267   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55268     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55269 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55270 
55271     # Need to check if the found msvcr is correct architecture
55272     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55273 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55274     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55275     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55276       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55277       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55278       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55279         CORRECT_MSVCR_ARCH="PE32 executable"
55280       else
55281         CORRECT_MSVCR_ARCH="PE32+ executable"
55282       fi
55283     else
55284       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55285         CORRECT_MSVCR_ARCH=386
55286       else
55287         CORRECT_MSVCR_ARCH=x86-64
55288       fi
55289     fi
55290     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55291       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55292 $as_echo "ok" >&6; }
55293       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55294 
55295   # Only process if variable expands to non-empty
55296 
55297   if test "x$MSVC_DLL" != x; then
55298     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55299 
55300   # Input might be given as Windows format, start by converting to
55301   # unix format.
55302   path="$MSVC_DLL"
55303   new_path=`$CYGPATH -u "$path"`
55304 
55305   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55306   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55307   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55308   # "foo.exe" is OK but "foo" is an error.
55309   #
55310   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55311   # It is also a way to make sure we got the proper file name for the real test later on.
55312   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55313   if test "x$test_shortpath" = x; then
55314     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55315 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55316     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55317   fi
55318 
55319   # Call helper function which possibly converts this using DOS-style short mode.
55320   # If so, the updated path is stored in $new_path.
55321 
55322   input_path="$new_path"
55323   # Check if we need to convert this using DOS-style short mode. If the path
55324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55325   # take no chances and rewrite it.
55326   # Note: m4 eats our [], so we need to use [ and ] instead.
55327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55328   if test "x$has_forbidden_chars" != x; then
55329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55330     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55331     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55332     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55333       # Going to short mode and back again did indeed matter. Since short mode is
55334       # case insensitive, let's make it lowercase to improve readability.
55335       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55336       # Now convert it back to Unix-style (cygpath)
55337       input_path=`$CYGPATH -u "$shortmode_path"`
55338       new_path="$input_path"
55339     fi
55340   fi
55341 
55342   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55343   if test "x$test_cygdrive_prefix" = x; then
55344     # As a simple fix, exclude /usr/bin since it's not a real path.
55345     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55346       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55347       # a path prefixed by /cygdrive for fixpath to work.
55348       new_path="$CYGWIN_ROOT_PATH$input_path"
55349     fi
55350   fi
55351 
55352 
55353   if test "x$path" != "x$new_path"; then
55354     MSVC_DLL="$new_path"
55355     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55356 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55357   fi
55358 
55359     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55360 
55361   path="$MSVC_DLL"
55362   has_colon=`$ECHO $path | $GREP ^.:`
55363   new_path="$path"
55364   if test "x$has_colon" = x; then
55365     # Not in mixed or Windows style, start by that.
55366     new_path=`cmd //c echo $path`
55367   fi
55368 
55369 
55370   input_path="$new_path"
55371   # Check if we need to convert this using DOS-style short mode. If the path
55372   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55373   # take no chances and rewrite it.
55374   # Note: m4 eats our [], so we need to use [ and ] instead.
55375   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55376   if test "x$has_forbidden_chars" != x; then
55377     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55378     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55379   fi
55380 
55381 
55382   windows_path="$new_path"
55383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55384     unix_path=`$CYGPATH -u "$windows_path"`
55385     new_path="$unix_path"
55386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55388     new_path="$unix_path"
55389   fi
55390 
55391   if test "x$path" != "x$new_path"; then
55392     MSVC_DLL="$new_path"
55393     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55394 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55395   fi
55396 
55397   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55398   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55399 
55400     else
55401       # We're on a unix platform. Hooray! :)
55402       path="$MSVC_DLL"
55403       has_space=`$ECHO "$path" | $GREP " "`
55404       if test "x$has_space" != x; then
55405         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55406 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55407         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55408       fi
55409 
55410       # Use eval to expand a potential ~
55411       eval path="$path"
55412       if test ! -f "$path" && test ! -d "$path"; then
55413         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55414       fi
55415 
55416       if test -d "$path"; then
55417         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55418       else
55419         dir="`$DIRNAME "$path"`"
55420         base="`$BASENAME "$path"`"
55421         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55422       fi
55423     fi
55424   fi
55425 
55426       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55427 $as_echo_n "checking for $DLL_NAME... " >&6; }
55428       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55429 $as_echo "$MSVC_DLL" >&6; }
55430     else
55431       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55432 $as_echo "incorrect, ignoring" >&6; }
55433       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55434 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55435     fi
55436   fi
55437 
55438   fi
55439 
55440   if test "x$MSVC_DLL" = x; then
55441     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55442     if test "x$VS100COMNTOOLS" != x; then
55443       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55444 
55445   windows_path="$CYGWIN_VS_TOOLS_DIR"
55446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55447     unix_path=`$CYGPATH -u "$windows_path"`
55448     CYGWIN_VS_TOOLS_DIR="$unix_path"
55449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55451     CYGWIN_VS_TOOLS_DIR="$unix_path"
55452   fi
55453 
55454       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55455         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55456             | $GREP -i /x64/ | $HEAD --lines 1`
55457       else
55458         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55459             | $GREP -i /x86/ | $HEAD --lines 1`
55460       fi
55461 
55462   DLL_NAME="$DLL_NAME"
55463   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55464   METHOD="search of VS100COMNTOOLS"
55465   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55466     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55467 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55468 
55469     # Need to check if the found msvcr is correct architecture
55470     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55471 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55472     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55473     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55474       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55475       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55476       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55477         CORRECT_MSVCR_ARCH="PE32 executable"
55478       else
55479         CORRECT_MSVCR_ARCH="PE32+ executable"
55480       fi
55481     else
55482       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55483         CORRECT_MSVCR_ARCH=386
55484       else
55485         CORRECT_MSVCR_ARCH=x86-64
55486       fi
55487     fi
55488     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55489       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55490 $as_echo "ok" >&6; }
55491       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55492 
55493   # Only process if variable expands to non-empty
55494 
55495   if test "x$MSVC_DLL" != x; then
55496     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55497 
55498   # Input might be given as Windows format, start by converting to
55499   # unix format.
55500   path="$MSVC_DLL"
55501   new_path=`$CYGPATH -u "$path"`
55502 
55503   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55504   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55505   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55506   # "foo.exe" is OK but "foo" is an error.
55507   #
55508   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55509   # It is also a way to make sure we got the proper file name for the real test later on.
55510   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55511   if test "x$test_shortpath" = x; then
55512     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55513 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55514     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55515   fi
55516 
55517   # Call helper function which possibly converts this using DOS-style short mode.
55518   # If so, the updated path is stored in $new_path.
55519 
55520   input_path="$new_path"
55521   # Check if we need to convert this using DOS-style short mode. If the path
55522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55523   # take no chances and rewrite it.
55524   # Note: m4 eats our [], so we need to use [ and ] instead.
55525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55526   if test "x$has_forbidden_chars" != x; then
55527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55528     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55529     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55530     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55531       # Going to short mode and back again did indeed matter. Since short mode is
55532       # case insensitive, let's make it lowercase to improve readability.
55533       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55534       # Now convert it back to Unix-style (cygpath)
55535       input_path=`$CYGPATH -u "$shortmode_path"`
55536       new_path="$input_path"
55537     fi
55538   fi
55539 
55540   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55541   if test "x$test_cygdrive_prefix" = x; then
55542     # As a simple fix, exclude /usr/bin since it's not a real path.
55543     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55544       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55545       # a path prefixed by /cygdrive for fixpath to work.
55546       new_path="$CYGWIN_ROOT_PATH$input_path"
55547     fi
55548   fi
55549 
55550 
55551   if test "x$path" != "x$new_path"; then
55552     MSVC_DLL="$new_path"
55553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55554 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55555   fi
55556 
55557     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55558 
55559   path="$MSVC_DLL"
55560   has_colon=`$ECHO $path | $GREP ^.:`
55561   new_path="$path"
55562   if test "x$has_colon" = x; then
55563     # Not in mixed or Windows style, start by that.
55564     new_path=`cmd //c echo $path`
55565   fi
55566 
55567 
55568   input_path="$new_path"
55569   # Check if we need to convert this using DOS-style short mode. If the path
55570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55571   # take no chances and rewrite it.
55572   # Note: m4 eats our [], so we need to use [ and ] instead.
55573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55574   if test "x$has_forbidden_chars" != x; then
55575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55576     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55577   fi
55578 
55579 
55580   windows_path="$new_path"
55581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55582     unix_path=`$CYGPATH -u "$windows_path"`
55583     new_path="$unix_path"
55584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55586     new_path="$unix_path"
55587   fi
55588 
55589   if test "x$path" != "x$new_path"; then
55590     MSVC_DLL="$new_path"
55591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55592 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55593   fi
55594 
55595   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55596   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55597 
55598     else
55599       # We're on a unix platform. Hooray! :)
55600       path="$MSVC_DLL"
55601       has_space=`$ECHO "$path" | $GREP " "`
55602       if test "x$has_space" != x; then
55603         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55604 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55605         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55606       fi
55607 
55608       # Use eval to expand a potential ~
55609       eval path="$path"
55610       if test ! -f "$path" && test ! -d "$path"; then
55611         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55612       fi
55613 
55614       if test -d "$path"; then
55615         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55616       else
55617         dir="`$DIRNAME "$path"`"
55618         base="`$BASENAME "$path"`"
55619         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55620       fi
55621     fi
55622   fi
55623 
55624       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55625 $as_echo_n "checking for $DLL_NAME... " >&6; }
55626       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55627 $as_echo "$MSVC_DLL" >&6; }
55628     else
55629       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55630 $as_echo "incorrect, ignoring" >&6; }
55631       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55632 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55633     fi
55634   fi
55635 
55636     fi
55637   fi
55638 
55639   if test "x$MSVC_DLL" = x; then
55640     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55641     # (This was the original behaviour; kept since it might turn something up)
55642     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55643       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55644         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55645             | $GREP x64 | $HEAD --lines 1`
55646       else
55647         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55648             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55649         if test "x$POSSIBLE_MSVC_DLL" = x; then
55650           # We're grasping at straws now...
55651           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55652               | $HEAD --lines 1`
55653         fi
55654       fi
55655 
55656 
55657   DLL_NAME="$DLL_NAME"
55658   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55659   METHOD="search of VCINSTALLDIR"
55660   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55661     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55662 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55663 
55664     # Need to check if the found msvcr is correct architecture
55665     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55666 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55667     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55668     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55669       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55670       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55671       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55672         CORRECT_MSVCR_ARCH="PE32 executable"
55673       else
55674         CORRECT_MSVCR_ARCH="PE32+ executable"
55675       fi
55676     else
55677       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55678         CORRECT_MSVCR_ARCH=386
55679       else
55680         CORRECT_MSVCR_ARCH=x86-64
55681       fi
55682     fi
55683     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55684       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55685 $as_echo "ok" >&6; }
55686       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55687 
55688   # Only process if variable expands to non-empty
55689 
55690   if test "x$MSVC_DLL" != x; then
55691     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55692 
55693   # Input might be given as Windows format, start by converting to
55694   # unix format.
55695   path="$MSVC_DLL"
55696   new_path=`$CYGPATH -u "$path"`
55697 
55698   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55699   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55700   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55701   # "foo.exe" is OK but "foo" is an error.
55702   #
55703   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55704   # It is also a way to make sure we got the proper file name for the real test later on.
55705   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55706   if test "x$test_shortpath" = x; then
55707     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55708 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55709     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55710   fi
55711 
55712   # Call helper function which possibly converts this using DOS-style short mode.
55713   # If so, the updated path is stored in $new_path.
55714 
55715   input_path="$new_path"
55716   # Check if we need to convert this using DOS-style short mode. If the path
55717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55718   # take no chances and rewrite it.
55719   # Note: m4 eats our [], so we need to use [ and ] instead.
55720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55721   if test "x$has_forbidden_chars" != x; then
55722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55723     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55724     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55725     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55726       # Going to short mode and back again did indeed matter. Since short mode is
55727       # case insensitive, let's make it lowercase to improve readability.
55728       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55729       # Now convert it back to Unix-style (cygpath)
55730       input_path=`$CYGPATH -u "$shortmode_path"`
55731       new_path="$input_path"
55732     fi
55733   fi
55734 
55735   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55736   if test "x$test_cygdrive_prefix" = x; then
55737     # As a simple fix, exclude /usr/bin since it's not a real path.
55738     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55739       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55740       # a path prefixed by /cygdrive for fixpath to work.
55741       new_path="$CYGWIN_ROOT_PATH$input_path"
55742     fi
55743   fi
55744 
55745 
55746   if test "x$path" != "x$new_path"; then
55747     MSVC_DLL="$new_path"
55748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55749 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55750   fi
55751 
55752     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55753 
55754   path="$MSVC_DLL"
55755   has_colon=`$ECHO $path | $GREP ^.:`
55756   new_path="$path"
55757   if test "x$has_colon" = x; then
55758     # Not in mixed or Windows style, start by that.
55759     new_path=`cmd //c echo $path`
55760   fi
55761 
55762 
55763   input_path="$new_path"
55764   # Check if we need to convert this using DOS-style short mode. If the path
55765   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55766   # take no chances and rewrite it.
55767   # Note: m4 eats our [], so we need to use [ and ] instead.
55768   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55769   if test "x$has_forbidden_chars" != x; then
55770     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55771     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55772   fi
55773 
55774 
55775   windows_path="$new_path"
55776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55777     unix_path=`$CYGPATH -u "$windows_path"`
55778     new_path="$unix_path"
55779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55781     new_path="$unix_path"
55782   fi
55783 
55784   if test "x$path" != "x$new_path"; then
55785     MSVC_DLL="$new_path"
55786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55787 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55788   fi
55789 
55790   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55791   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55792 
55793     else
55794       # We're on a unix platform. Hooray! :)
55795       path="$MSVC_DLL"
55796       has_space=`$ECHO "$path" | $GREP " "`
55797       if test "x$has_space" != x; then
55798         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55799 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55800         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55801       fi
55802 
55803       # Use eval to expand a potential ~
55804       eval path="$path"
55805       if test ! -f "$path" && test ! -d "$path"; then
55806         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55807       fi
55808 
55809       if test -d "$path"; then
55810         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55811       else
55812         dir="`$DIRNAME "$path"`"
55813         base="`$BASENAME "$path"`"
55814         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55815       fi
55816     fi
55817   fi
55818 
55819       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55820 $as_echo_n "checking for $DLL_NAME... " >&6; }
55821       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55822 $as_echo "$MSVC_DLL" >&6; }
55823     else
55824       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55825 $as_echo "incorrect, ignoring" >&6; }
55826       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55827 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55828     fi
55829   fi
55830 
55831     fi
55832   fi
55833 
55834   if test "x$MSVC_DLL" = x; then
55835     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55836 $as_echo_n "checking for $DLL_NAME... " >&6; }
55837     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55838 $as_echo "no" >&6; }
55839     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55840   fi
55841 
55842     MSVCR_DLL="$MSVC_DLL"
55843   fi
55844 
55845 
55846 
55847 # Check whether --with-msvcp-dll was given.
55848 if test "${with_msvcp_dll+set}" = set; then :
55849   withval=$with_msvcp_dll;
55850 fi
55851 
55852 
55853   if test "x$MSVCP_NAME" != "x"; then
55854     if test "x$with_msvcp_dll" != x; then
55855       # If given explicitly by user, do not probe. If not present, fail directly.
55856 
55857   DLL_NAME="$MSVCP_NAME"
55858   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55859   METHOD="--with-msvcp-dll"
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       if test "x$MSVC_DLL" = x; then
56032         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
56033       fi
56034       MSVCP_DLL="$MSVC_DLL"
56035     elif test "x$DEVKIT_MSVCP_DLL" != x; then
56036 
56037   DLL_NAME="$MSVCP_NAME"
56038   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
56039   METHOD="devkit"
56040   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56041     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56042 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56043 
56044     # Need to check if the found msvcr is correct architecture
56045     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56046 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56047     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56048     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56049       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56050       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56051       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56052         CORRECT_MSVCR_ARCH="PE32 executable"
56053       else
56054         CORRECT_MSVCR_ARCH="PE32+ executable"
56055       fi
56056     else
56057       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56058         CORRECT_MSVCR_ARCH=386
56059       else
56060         CORRECT_MSVCR_ARCH=x86-64
56061       fi
56062     fi
56063     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56064       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56065 $as_echo "ok" >&6; }
56066       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56067 
56068   # Only process if variable expands to non-empty
56069 
56070   if test "x$MSVC_DLL" != x; then
56071     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56072 
56073   # Input might be given as Windows format, start by converting to
56074   # unix format.
56075   path="$MSVC_DLL"
56076   new_path=`$CYGPATH -u "$path"`
56077 
56078   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56079   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56080   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56081   # "foo.exe" is OK but "foo" is an error.
56082   #
56083   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56084   # It is also a way to make sure we got the proper file name for the real test later on.
56085   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56086   if test "x$test_shortpath" = x; then
56087     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56088 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56089     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56090   fi
56091 
56092   # Call helper function which possibly converts this using DOS-style short mode.
56093   # If so, the updated path is stored in $new_path.
56094 
56095   input_path="$new_path"
56096   # Check if we need to convert this using DOS-style short mode. If the path
56097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56098   # take no chances and rewrite it.
56099   # Note: m4 eats our [], so we need to use [ and ] instead.
56100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56101   if test "x$has_forbidden_chars" != x; then
56102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56106       # Going to short mode and back again did indeed matter. Since short mode is
56107       # case insensitive, let's make it lowercase to improve readability.
56108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56109       # Now convert it back to Unix-style (cygpath)
56110       input_path=`$CYGPATH -u "$shortmode_path"`
56111       new_path="$input_path"
56112     fi
56113   fi
56114 
56115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56116   if test "x$test_cygdrive_prefix" = x; then
56117     # As a simple fix, exclude /usr/bin since it's not a real path.
56118     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56120       # a path prefixed by /cygdrive for fixpath to work.
56121       new_path="$CYGWIN_ROOT_PATH$input_path"
56122     fi
56123   fi
56124 
56125 
56126   if test "x$path" != "x$new_path"; then
56127     MSVC_DLL="$new_path"
56128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56129 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56130   fi
56131 
56132     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56133 
56134   path="$MSVC_DLL"
56135   has_colon=`$ECHO $path | $GREP ^.:`
56136   new_path="$path"
56137   if test "x$has_colon" = x; then
56138     # Not in mixed or Windows style, start by that.
56139     new_path=`cmd //c echo $path`
56140   fi
56141 
56142 
56143   input_path="$new_path"
56144   # Check if we need to convert this using DOS-style short mode. If the path
56145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56146   # take no chances and rewrite it.
56147   # Note: m4 eats our [], so we need to use [ and ] instead.
56148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56149   if test "x$has_forbidden_chars" != x; then
56150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56151     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56152   fi
56153 
56154 
56155   windows_path="$new_path"
56156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56157     unix_path=`$CYGPATH -u "$windows_path"`
56158     new_path="$unix_path"
56159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56161     new_path="$unix_path"
56162   fi
56163 
56164   if test "x$path" != "x$new_path"; then
56165     MSVC_DLL="$new_path"
56166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56167 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56168   fi
56169 
56170   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56171   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56172 
56173     else
56174       # We're on a unix platform. Hooray! :)
56175       path="$MSVC_DLL"
56176       has_space=`$ECHO "$path" | $GREP " "`
56177       if test "x$has_space" != x; then
56178         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56179 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56180         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56181       fi
56182 
56183       # Use eval to expand a potential ~
56184       eval path="$path"
56185       if test ! -f "$path" && test ! -d "$path"; then
56186         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56187       fi
56188 
56189       if test -d "$path"; then
56190         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56191       else
56192         dir="`$DIRNAME "$path"`"
56193         base="`$BASENAME "$path"`"
56194         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56195       fi
56196     fi
56197   fi
56198 
56199       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56200 $as_echo_n "checking for $DLL_NAME... " >&6; }
56201       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56202 $as_echo "$MSVC_DLL" >&6; }
56203     else
56204       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56205 $as_echo "incorrect, ignoring" >&6; }
56206       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56207 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56208     fi
56209   fi
56210 
56211       if test "x$MSVC_DLL" = x; then
56212         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
56213       fi
56214       MSVCP_DLL="$MSVC_DLL"
56215     else
56216 
56217   DLL_NAME="${MSVCP_NAME}"
56218   MSVC_DLL=
56219 
56220   if test "x$MSVC_DLL" = x; then
56221     # Probe: Using well-known location from Visual Studio 10.0
56222     if test "x$VCINSTALLDIR" != x; then
56223       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56224 
56225   windows_path="$CYGWIN_VC_INSTALL_DIR"
56226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56227     unix_path=`$CYGPATH -u "$windows_path"`
56228     CYGWIN_VC_INSTALL_DIR="$unix_path"
56229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56231     CYGWIN_VC_INSTALL_DIR="$unix_path"
56232   fi
56233 
56234       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56235         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56236       else
56237         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56238       fi
56239       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
56240 
56241   DLL_NAME="$DLL_NAME"
56242   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56243   METHOD="well-known location in VCINSTALLDIR"
56244   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56245     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56246 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56247 
56248     # Need to check if the found msvcr is correct architecture
56249     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56250 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56251     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56252     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56253       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56254       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56255       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56256         CORRECT_MSVCR_ARCH="PE32 executable"
56257       else
56258         CORRECT_MSVCR_ARCH="PE32+ executable"
56259       fi
56260     else
56261       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56262         CORRECT_MSVCR_ARCH=386
56263       else
56264         CORRECT_MSVCR_ARCH=x86-64
56265       fi
56266     fi
56267     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56268       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56269 $as_echo "ok" >&6; }
56270       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56271 
56272   # Only process if variable expands to non-empty
56273 
56274   if test "x$MSVC_DLL" != x; then
56275     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56276 
56277   # Input might be given as Windows format, start by converting to
56278   # unix format.
56279   path="$MSVC_DLL"
56280   new_path=`$CYGPATH -u "$path"`
56281 
56282   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56283   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56284   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56285   # "foo.exe" is OK but "foo" is an error.
56286   #
56287   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56288   # It is also a way to make sure we got the proper file name for the real test later on.
56289   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56290   if test "x$test_shortpath" = x; then
56291     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56292 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56293     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56294   fi
56295 
56296   # Call helper function which possibly converts this using DOS-style short mode.
56297   # If so, the updated path is stored in $new_path.
56298 
56299   input_path="$new_path"
56300   # Check if we need to convert this using DOS-style short mode. If the path
56301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56302   # take no chances and rewrite it.
56303   # Note: m4 eats our [], so we need to use [ and ] instead.
56304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56305   if test "x$has_forbidden_chars" != x; then
56306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56310       # Going to short mode and back again did indeed matter. Since short mode is
56311       # case insensitive, let's make it lowercase to improve readability.
56312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56313       # Now convert it back to Unix-style (cygpath)
56314       input_path=`$CYGPATH -u "$shortmode_path"`
56315       new_path="$input_path"
56316     fi
56317   fi
56318 
56319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56320   if test "x$test_cygdrive_prefix" = x; then
56321     # As a simple fix, exclude /usr/bin since it's not a real path.
56322     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56324       # a path prefixed by /cygdrive for fixpath to work.
56325       new_path="$CYGWIN_ROOT_PATH$input_path"
56326     fi
56327   fi
56328 
56329 
56330   if test "x$path" != "x$new_path"; then
56331     MSVC_DLL="$new_path"
56332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56333 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56334   fi
56335 
56336     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56337 
56338   path="$MSVC_DLL"
56339   has_colon=`$ECHO $path | $GREP ^.:`
56340   new_path="$path"
56341   if test "x$has_colon" = x; then
56342     # Not in mixed or Windows style, start by that.
56343     new_path=`cmd //c echo $path`
56344   fi
56345 
56346 
56347   input_path="$new_path"
56348   # Check if we need to convert this using DOS-style short mode. If the path
56349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56350   # take no chances and rewrite it.
56351   # Note: m4 eats our [], so we need to use [ and ] instead.
56352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56353   if test "x$has_forbidden_chars" != x; then
56354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56355     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56356   fi
56357 
56358 
56359   windows_path="$new_path"
56360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56361     unix_path=`$CYGPATH -u "$windows_path"`
56362     new_path="$unix_path"
56363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56365     new_path="$unix_path"
56366   fi
56367 
56368   if test "x$path" != "x$new_path"; then
56369     MSVC_DLL="$new_path"
56370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56371 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56372   fi
56373 
56374   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56375   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56376 
56377     else
56378       # We're on a unix platform. Hooray! :)
56379       path="$MSVC_DLL"
56380       has_space=`$ECHO "$path" | $GREP " "`
56381       if test "x$has_space" != x; then
56382         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56383 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56384         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56385       fi
56386 
56387       # Use eval to expand a potential ~
56388       eval path="$path"
56389       if test ! -f "$path" && test ! -d "$path"; then
56390         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56391       fi
56392 
56393       if test -d "$path"; then
56394         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56395       else
56396         dir="`$DIRNAME "$path"`"
56397         base="`$BASENAME "$path"`"
56398         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56399       fi
56400     fi
56401   fi
56402 
56403       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56404 $as_echo_n "checking for $DLL_NAME... " >&6; }
56405       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56406 $as_echo "$MSVC_DLL" >&6; }
56407     else
56408       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56409 $as_echo "incorrect, ignoring" >&6; }
56410       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56411 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56412     fi
56413   fi
56414 
56415     fi
56416   fi
56417 
56418   if test "x$MSVC_DLL" = x; then
56419     # Probe: Check in the Boot JDK directory.
56420     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56421 
56422   DLL_NAME="$DLL_NAME"
56423   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56424   METHOD="well-known location in Boot JDK"
56425   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56426     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56427 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56428 
56429     # Need to check if the found msvcr is correct architecture
56430     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56431 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56432     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56433     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56434       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56435       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56436       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56437         CORRECT_MSVCR_ARCH="PE32 executable"
56438       else
56439         CORRECT_MSVCR_ARCH="PE32+ executable"
56440       fi
56441     else
56442       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56443         CORRECT_MSVCR_ARCH=386
56444       else
56445         CORRECT_MSVCR_ARCH=x86-64
56446       fi
56447     fi
56448     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56449       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56450 $as_echo "ok" >&6; }
56451       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56452 
56453   # Only process if variable expands to non-empty
56454 
56455   if test "x$MSVC_DLL" != x; then
56456     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56457 
56458   # Input might be given as Windows format, start by converting to
56459   # unix format.
56460   path="$MSVC_DLL"
56461   new_path=`$CYGPATH -u "$path"`
56462 
56463   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56464   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56465   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56466   # "foo.exe" is OK but "foo" is an error.
56467   #
56468   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56469   # It is also a way to make sure we got the proper file name for the real test later on.
56470   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56471   if test "x$test_shortpath" = x; then
56472     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56473 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56474     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56475   fi
56476 
56477   # Call helper function which possibly converts this using DOS-style short mode.
56478   # If so, the updated path is stored in $new_path.
56479 
56480   input_path="$new_path"
56481   # Check if we need to convert this using DOS-style short mode. If the path
56482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56483   # take no chances and rewrite it.
56484   # Note: m4 eats our [], so we need to use [ and ] instead.
56485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56486   if test "x$has_forbidden_chars" != x; then
56487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56488     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56489     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56490     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56491       # Going to short mode and back again did indeed matter. Since short mode is
56492       # case insensitive, let's make it lowercase to improve readability.
56493       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56494       # Now convert it back to Unix-style (cygpath)
56495       input_path=`$CYGPATH -u "$shortmode_path"`
56496       new_path="$input_path"
56497     fi
56498   fi
56499 
56500   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56501   if test "x$test_cygdrive_prefix" = x; then
56502     # As a simple fix, exclude /usr/bin since it's not a real path.
56503     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56504       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56505       # a path prefixed by /cygdrive for fixpath to work.
56506       new_path="$CYGWIN_ROOT_PATH$input_path"
56507     fi
56508   fi
56509 
56510 
56511   if test "x$path" != "x$new_path"; then
56512     MSVC_DLL="$new_path"
56513     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56514 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56515   fi
56516 
56517     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56518 
56519   path="$MSVC_DLL"
56520   has_colon=`$ECHO $path | $GREP ^.:`
56521   new_path="$path"
56522   if test "x$has_colon" = x; then
56523     # Not in mixed or Windows style, start by that.
56524     new_path=`cmd //c echo $path`
56525   fi
56526 
56527 
56528   input_path="$new_path"
56529   # Check if we need to convert this using DOS-style short mode. If the path
56530   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56531   # take no chances and rewrite it.
56532   # Note: m4 eats our [], so we need to use [ and ] instead.
56533   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56534   if test "x$has_forbidden_chars" != x; then
56535     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56536     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56537   fi
56538 
56539 
56540   windows_path="$new_path"
56541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56542     unix_path=`$CYGPATH -u "$windows_path"`
56543     new_path="$unix_path"
56544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56546     new_path="$unix_path"
56547   fi
56548 
56549   if test "x$path" != "x$new_path"; then
56550     MSVC_DLL="$new_path"
56551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56552 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56553   fi
56554 
56555   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56556   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56557 
56558     else
56559       # We're on a unix platform. Hooray! :)
56560       path="$MSVC_DLL"
56561       has_space=`$ECHO "$path" | $GREP " "`
56562       if test "x$has_space" != x; then
56563         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56564 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56565         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56566       fi
56567 
56568       # Use eval to expand a potential ~
56569       eval path="$path"
56570       if test ! -f "$path" && test ! -d "$path"; then
56571         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56572       fi
56573 
56574       if test -d "$path"; then
56575         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56576       else
56577         dir="`$DIRNAME "$path"`"
56578         base="`$BASENAME "$path"`"
56579         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56580       fi
56581     fi
56582   fi
56583 
56584       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56585 $as_echo_n "checking for $DLL_NAME... " >&6; }
56586       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56587 $as_echo "$MSVC_DLL" >&6; }
56588     else
56589       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56590 $as_echo "incorrect, ignoring" >&6; }
56591       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56592 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56593     fi
56594   fi
56595 
56596   fi
56597 
56598   if test "x$MSVC_DLL" = x; then
56599     # Probe: Look in the Windows system32 directory
56600     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56601 
56602   windows_path="$CYGWIN_SYSTEMROOT"
56603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56604     unix_path=`$CYGPATH -u "$windows_path"`
56605     CYGWIN_SYSTEMROOT="$unix_path"
56606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56608     CYGWIN_SYSTEMROOT="$unix_path"
56609   fi
56610 
56611     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56612 
56613   DLL_NAME="$DLL_NAME"
56614   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56615   METHOD="well-known location in SYSTEMROOT"
56616   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56617     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56618 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56619 
56620     # Need to check if the found msvcr is correct architecture
56621     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56622 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56623     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56624     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56625       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56626       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56627       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56628         CORRECT_MSVCR_ARCH="PE32 executable"
56629       else
56630         CORRECT_MSVCR_ARCH="PE32+ executable"
56631       fi
56632     else
56633       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56634         CORRECT_MSVCR_ARCH=386
56635       else
56636         CORRECT_MSVCR_ARCH=x86-64
56637       fi
56638     fi
56639     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56640       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56641 $as_echo "ok" >&6; }
56642       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56643 
56644   # Only process if variable expands to non-empty
56645 
56646   if test "x$MSVC_DLL" != x; then
56647     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56648 
56649   # Input might be given as Windows format, start by converting to
56650   # unix format.
56651   path="$MSVC_DLL"
56652   new_path=`$CYGPATH -u "$path"`
56653 
56654   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56655   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56656   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56657   # "foo.exe" is OK but "foo" is an error.
56658   #
56659   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56660   # It is also a way to make sure we got the proper file name for the real test later on.
56661   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56662   if test "x$test_shortpath" = x; then
56663     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56664 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56665     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56666   fi
56667 
56668   # Call helper function which possibly converts this using DOS-style short mode.
56669   # If so, the updated path is stored in $new_path.
56670 
56671   input_path="$new_path"
56672   # Check if we need to convert this using DOS-style short mode. If the path
56673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56674   # take no chances and rewrite it.
56675   # Note: m4 eats our [], so we need to use [ and ] instead.
56676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56677   if test "x$has_forbidden_chars" != x; then
56678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56679     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56680     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56681     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56682       # Going to short mode and back again did indeed matter. Since short mode is
56683       # case insensitive, let's make it lowercase to improve readability.
56684       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56685       # Now convert it back to Unix-style (cygpath)
56686       input_path=`$CYGPATH -u "$shortmode_path"`
56687       new_path="$input_path"
56688     fi
56689   fi
56690 
56691   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56692   if test "x$test_cygdrive_prefix" = x; then
56693     # As a simple fix, exclude /usr/bin since it's not a real path.
56694     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56695       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56696       # a path prefixed by /cygdrive for fixpath to work.
56697       new_path="$CYGWIN_ROOT_PATH$input_path"
56698     fi
56699   fi
56700 
56701 
56702   if test "x$path" != "x$new_path"; then
56703     MSVC_DLL="$new_path"
56704     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56705 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56706   fi
56707 
56708     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56709 
56710   path="$MSVC_DLL"
56711   has_colon=`$ECHO $path | $GREP ^.:`
56712   new_path="$path"
56713   if test "x$has_colon" = x; then
56714     # Not in mixed or Windows style, start by that.
56715     new_path=`cmd //c echo $path`
56716   fi
56717 
56718 
56719   input_path="$new_path"
56720   # Check if we need to convert this using DOS-style short mode. If the path
56721   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56722   # take no chances and rewrite it.
56723   # Note: m4 eats our [], so we need to use [ and ] instead.
56724   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56725   if test "x$has_forbidden_chars" != x; then
56726     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56727     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56728   fi
56729 
56730 
56731   windows_path="$new_path"
56732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56733     unix_path=`$CYGPATH -u "$windows_path"`
56734     new_path="$unix_path"
56735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56736     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56737     new_path="$unix_path"
56738   fi
56739 
56740   if test "x$path" != "x$new_path"; then
56741     MSVC_DLL="$new_path"
56742     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56743 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56744   fi
56745 
56746   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56747   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56748 
56749     else
56750       # We're on a unix platform. Hooray! :)
56751       path="$MSVC_DLL"
56752       has_space=`$ECHO "$path" | $GREP " "`
56753       if test "x$has_space" != x; then
56754         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56755 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56756         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56757       fi
56758 
56759       # Use eval to expand a potential ~
56760       eval path="$path"
56761       if test ! -f "$path" && test ! -d "$path"; then
56762         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56763       fi
56764 
56765       if test -d "$path"; then
56766         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56767       else
56768         dir="`$DIRNAME "$path"`"
56769         base="`$BASENAME "$path"`"
56770         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56771       fi
56772     fi
56773   fi
56774 
56775       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56776 $as_echo_n "checking for $DLL_NAME... " >&6; }
56777       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56778 $as_echo "$MSVC_DLL" >&6; }
56779     else
56780       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56781 $as_echo "incorrect, ignoring" >&6; }
56782       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56783 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56784     fi
56785   fi
56786 
56787   fi
56788 
56789   if test "x$MSVC_DLL" = x; then
56790     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56791     if test "x$VS100COMNTOOLS" != x; then
56792       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56793 
56794   windows_path="$CYGWIN_VS_TOOLS_DIR"
56795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56796     unix_path=`$CYGPATH -u "$windows_path"`
56797     CYGWIN_VS_TOOLS_DIR="$unix_path"
56798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56800     CYGWIN_VS_TOOLS_DIR="$unix_path"
56801   fi
56802 
56803       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56804         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56805             | $GREP -i /x64/ | $HEAD --lines 1`
56806       else
56807         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56808             | $GREP -i /x86/ | $HEAD --lines 1`
56809       fi
56810 
56811   DLL_NAME="$DLL_NAME"
56812   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56813   METHOD="search of VS100COMNTOOLS"
56814   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56815     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56816 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56817 
56818     # Need to check if the found msvcr is correct architecture
56819     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56820 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56821     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56822     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56823       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56824       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56825       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56826         CORRECT_MSVCR_ARCH="PE32 executable"
56827       else
56828         CORRECT_MSVCR_ARCH="PE32+ executable"
56829       fi
56830     else
56831       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56832         CORRECT_MSVCR_ARCH=386
56833       else
56834         CORRECT_MSVCR_ARCH=x86-64
56835       fi
56836     fi
56837     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56838       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56839 $as_echo "ok" >&6; }
56840       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56841 
56842   # Only process if variable expands to non-empty
56843 
56844   if test "x$MSVC_DLL" != x; then
56845     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56846 
56847   # Input might be given as Windows format, start by converting to
56848   # unix format.
56849   path="$MSVC_DLL"
56850   new_path=`$CYGPATH -u "$path"`
56851 
56852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56855   # "foo.exe" is OK but "foo" is an error.
56856   #
56857   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56858   # It is also a way to make sure we got the proper file name for the real test later on.
56859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56860   if test "x$test_shortpath" = x; then
56861     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56862 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56863     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56864   fi
56865 
56866   # Call helper function which possibly converts this using DOS-style short mode.
56867   # If so, the updated path is stored in $new_path.
56868 
56869   input_path="$new_path"
56870   # Check if we need to convert this using DOS-style short mode. If the path
56871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56872   # take no chances and rewrite it.
56873   # Note: m4 eats our [], so we need to use [ and ] instead.
56874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56875   if test "x$has_forbidden_chars" != x; then
56876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56880       # Going to short mode and back again did indeed matter. Since short mode is
56881       # case insensitive, let's make it lowercase to improve readability.
56882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56883       # Now convert it back to Unix-style (cygpath)
56884       input_path=`$CYGPATH -u "$shortmode_path"`
56885       new_path="$input_path"
56886     fi
56887   fi
56888 
56889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56890   if test "x$test_cygdrive_prefix" = x; then
56891     # As a simple fix, exclude /usr/bin since it's not a real path.
56892     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56894       # a path prefixed by /cygdrive for fixpath to work.
56895       new_path="$CYGWIN_ROOT_PATH$input_path"
56896     fi
56897   fi
56898 
56899 
56900   if test "x$path" != "x$new_path"; then
56901     MSVC_DLL="$new_path"
56902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56903 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56904   fi
56905 
56906     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56907 
56908   path="$MSVC_DLL"
56909   has_colon=`$ECHO $path | $GREP ^.:`
56910   new_path="$path"
56911   if test "x$has_colon" = x; then
56912     # Not in mixed or Windows style, start by that.
56913     new_path=`cmd //c echo $path`
56914   fi
56915 
56916 
56917   input_path="$new_path"
56918   # Check if we need to convert this using DOS-style short mode. If the path
56919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56920   # take no chances and rewrite it.
56921   # Note: m4 eats our [], so we need to use [ and ] instead.
56922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56923   if test "x$has_forbidden_chars" != x; then
56924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56926   fi
56927 
56928 
56929   windows_path="$new_path"
56930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56931     unix_path=`$CYGPATH -u "$windows_path"`
56932     new_path="$unix_path"
56933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56935     new_path="$unix_path"
56936   fi
56937 
56938   if test "x$path" != "x$new_path"; then
56939     MSVC_DLL="$new_path"
56940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56941 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56942   fi
56943 
56944   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56945   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56946 
56947     else
56948       # We're on a unix platform. Hooray! :)
56949       path="$MSVC_DLL"
56950       has_space=`$ECHO "$path" | $GREP " "`
56951       if test "x$has_space" != x; then
56952         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56953 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56954         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56955       fi
56956 
56957       # Use eval to expand a potential ~
56958       eval path="$path"
56959       if test ! -f "$path" && test ! -d "$path"; then
56960         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56961       fi
56962 
56963       if test -d "$path"; then
56964         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56965       else
56966         dir="`$DIRNAME "$path"`"
56967         base="`$BASENAME "$path"`"
56968         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56969       fi
56970     fi
56971   fi
56972 
56973       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56974 $as_echo_n "checking for $DLL_NAME... " >&6; }
56975       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56976 $as_echo "$MSVC_DLL" >&6; }
56977     else
56978       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56979 $as_echo "incorrect, ignoring" >&6; }
56980       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56981 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56982     fi
56983   fi
56984 
56985     fi
56986   fi
56987 
56988   if test "x$MSVC_DLL" = x; then
56989     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56990     # (This was the original behaviour; kept since it might turn something up)
56991     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56992       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56993         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56994             | $GREP x64 | $HEAD --lines 1`
56995       else
56996         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56997             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56998         if test "x$POSSIBLE_MSVC_DLL" = x; then
56999           # We're grasping at straws now...
57000           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
57001               | $HEAD --lines 1`
57002         fi
57003       fi
57004 
57005 
57006   DLL_NAME="$DLL_NAME"
57007   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57008   METHOD="search of VCINSTALLDIR"
57009   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57010     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57011 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57012 
57013     # Need to check if the found msvcr is correct architecture
57014     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57015 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57016     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57017     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57018       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57019       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57020       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57021         CORRECT_MSVCR_ARCH="PE32 executable"
57022       else
57023         CORRECT_MSVCR_ARCH="PE32+ executable"
57024       fi
57025     else
57026       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57027         CORRECT_MSVCR_ARCH=386
57028       else
57029         CORRECT_MSVCR_ARCH=x86-64
57030       fi
57031     fi
57032     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57033       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57034 $as_echo "ok" >&6; }
57035       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57036 
57037   # Only process if variable expands to non-empty
57038 
57039   if test "x$MSVC_DLL" != x; then
57040     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57041 
57042   # Input might be given as Windows format, start by converting to
57043   # unix format.
57044   path="$MSVC_DLL"
57045   new_path=`$CYGPATH -u "$path"`
57046 
57047   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57048   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57049   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57050   # "foo.exe" is OK but "foo" is an error.
57051   #
57052   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57053   # It is also a way to make sure we got the proper file name for the real test later on.
57054   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57055   if test "x$test_shortpath" = x; then
57056     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57057 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57058     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57059   fi
57060 
57061   # Call helper function which possibly converts this using DOS-style short mode.
57062   # If so, the updated path is stored in $new_path.
57063 
57064   input_path="$new_path"
57065   # Check if we need to convert this using DOS-style short mode. If the path
57066   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57067   # take no chances and rewrite it.
57068   # Note: m4 eats our [], so we need to use [ and ] instead.
57069   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57070   if test "x$has_forbidden_chars" != x; then
57071     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57072     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57073     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57074     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57075       # Going to short mode and back again did indeed matter. Since short mode is
57076       # case insensitive, let's make it lowercase to improve readability.
57077       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57078       # Now convert it back to Unix-style (cygpath)
57079       input_path=`$CYGPATH -u "$shortmode_path"`
57080       new_path="$input_path"
57081     fi
57082   fi
57083 
57084   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57085   if test "x$test_cygdrive_prefix" = x; then
57086     # As a simple fix, exclude /usr/bin since it's not a real path.
57087     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57088       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57089       # a path prefixed by /cygdrive for fixpath to work.
57090       new_path="$CYGWIN_ROOT_PATH$input_path"
57091     fi
57092   fi
57093 
57094 
57095   if test "x$path" != "x$new_path"; then
57096     MSVC_DLL="$new_path"
57097     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57098 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57099   fi
57100 
57101     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57102 
57103   path="$MSVC_DLL"
57104   has_colon=`$ECHO $path | $GREP ^.:`
57105   new_path="$path"
57106   if test "x$has_colon" = x; then
57107     # Not in mixed or Windows style, start by that.
57108     new_path=`cmd //c echo $path`
57109   fi
57110 
57111 
57112   input_path="$new_path"
57113   # Check if we need to convert this using DOS-style short mode. If the path
57114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57115   # take no chances and rewrite it.
57116   # Note: m4 eats our [], so we need to use [ and ] instead.
57117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57118   if test "x$has_forbidden_chars" != x; then
57119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57120     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57121   fi
57122 
57123 
57124   windows_path="$new_path"
57125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57126     unix_path=`$CYGPATH -u "$windows_path"`
57127     new_path="$unix_path"
57128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57130     new_path="$unix_path"
57131   fi
57132 
57133   if test "x$path" != "x$new_path"; then
57134     MSVC_DLL="$new_path"
57135     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57136 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57137   fi
57138 
57139   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57140   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57141 
57142     else
57143       # We're on a unix platform. Hooray! :)
57144       path="$MSVC_DLL"
57145       has_space=`$ECHO "$path" | $GREP " "`
57146       if test "x$has_space" != x; then
57147         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57148 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57149         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57150       fi
57151 
57152       # Use eval to expand a potential ~
57153       eval path="$path"
57154       if test ! -f "$path" && test ! -d "$path"; then
57155         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57156       fi
57157 
57158       if test -d "$path"; then
57159         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57160       else
57161         dir="`$DIRNAME "$path"`"
57162         base="`$BASENAME "$path"`"
57163         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57164       fi
57165     fi
57166   fi
57167 
57168       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57169 $as_echo_n "checking for $DLL_NAME... " >&6; }
57170       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57171 $as_echo "$MSVC_DLL" >&6; }
57172     else
57173       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57174 $as_echo "incorrect, ignoring" >&6; }
57175       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57176 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57177     fi
57178   fi
57179 
57180     fi
57181   fi
57182 
57183   if test "x$MSVC_DLL" = x; then
57184     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57185 $as_echo_n "checking for $DLL_NAME... " >&6; }
57186     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57187 $as_echo "no" >&6; }
57188     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
57189   fi
57190 
57191       MSVCP_DLL="$MSVC_DLL"
57192     fi
57193 
57194   fi
57195 
57196   fi
57197 
57198 
57199   if test "x$NEEDS_LIB_X11" = xfalse; then
57200     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
57201       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
57202 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
57203     fi
57204     X_CFLAGS=
57205     X_LIBS=
57206   else
57207 
57208     if test "x${with_x}" = xno; then
57209       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
57210     fi
57211 
57212     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
57213       # The user has specified a X11 base directory. Use it for includes and
57214       # libraries, unless explicitly overridden.
57215       if test "x$x_includes" = xNONE; then
57216         x_includes="${with_x}/include"
57217       fi
57218       if test "x$x_libraries" = xNONE; then
57219         x_libraries="${with_x}/lib"
57220       fi
57221     else
57222       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
57223       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
57224       # --x-libraries for the sysroot, if that seems to be correct.
57225       if test "x$SYSROOT" != "x"; then
57226         if test "x$x_includes" = xNONE; then
57227           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
57228             x_includes="$SYSROOT/usr/X11R6/include"
57229           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
57230             x_includes="$SYSROOT/usr/include"
57231           fi
57232         fi
57233         if test "x$x_libraries" = xNONE; then
57234           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
57235             x_libraries="$SYSROOT/usr/X11R6/lib"
57236           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57237             x_libraries="$SYSROOT/usr/lib64"
57238           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
57239             x_libraries="$SYSROOT/usr/lib"
57240           fi
57241         fi
57242       fi
57243     fi
57244 
57245     # Now let autoconf do it's magic
57246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
57247 $as_echo_n "checking for X... " >&6; }
57248 
57249 
57250 # Check whether --with-x was given.
57251 if test "${with_x+set}" = set; then :
57252   withval=$with_x;
57253 fi
57254 
57255 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
57256 if test "x$with_x" = xno; then
57257   # The user explicitly disabled X.
57258   have_x=disabled
57259 else
57260   case $x_includes,$x_libraries in #(
57261     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
57262     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
57263   $as_echo_n "(cached) " >&6
57264 else
57265   # One or both of the vars are not set, and there is no cached value.
57266 ac_x_includes=no ac_x_libraries=no
57267 rm -f -r conftest.dir
57268 if mkdir conftest.dir; then
57269   cd conftest.dir
57270   cat >Imakefile <<'_ACEOF'
57271 incroot:
57272         @echo incroot='${INCROOT}'
57273 usrlibdir:
57274         @echo usrlibdir='${USRLIBDIR}'
57275 libdir:
57276         @echo libdir='${LIBDIR}'
57277 _ACEOF
57278   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
57279     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
57280     for ac_var in incroot usrlibdir libdir; do
57281       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
57282     done
57283     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
57284     for ac_extension in a so sl dylib la dll; do
57285       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
57286          test -f "$ac_im_libdir/libX11.$ac_extension"; then
57287         ac_im_usrlibdir=$ac_im_libdir; break
57288       fi
57289     done
57290     # Screen out bogus values from the imake configuration.  They are
57291     # bogus both because they are the default anyway, and because
57292     # using them would break gcc on systems where it needs fixed includes.
57293     case $ac_im_incroot in
57294         /usr/include) ac_x_includes= ;;
57295         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
57296     esac
57297     case $ac_im_usrlibdir in
57298         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
57299         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
57300     esac
57301   fi
57302   cd ..
57303   rm -f -r conftest.dir
57304 fi
57305 
57306 # Standard set of common directories for X headers.
57307 # Check X11 before X11Rn because it is often a symlink to the current release.
57308 ac_x_header_dirs='
57309 /usr/X11/include
57310 /usr/X11R7/include
57311 /usr/X11R6/include
57312 /usr/X11R5/include
57313 /usr/X11R4/include
57314 
57315 /usr/include/X11
57316 /usr/include/X11R7
57317 /usr/include/X11R6
57318 /usr/include/X11R5
57319 /usr/include/X11R4
57320 
57321 /usr/local/X11/include
57322 /usr/local/X11R7/include
57323 /usr/local/X11R6/include
57324 /usr/local/X11R5/include
57325 /usr/local/X11R4/include
57326 
57327 /usr/local/include/X11
57328 /usr/local/include/X11R7
57329 /usr/local/include/X11R6
57330 /usr/local/include/X11R5
57331 /usr/local/include/X11R4
57332 
57333 /usr/X386/include
57334 /usr/x386/include
57335 /usr/XFree86/include/X11
57336 
57337 /usr/include
57338 /usr/local/include
57339 /usr/unsupported/include
57340 /usr/athena/include
57341 /usr/local/x11r5/include
57342 /usr/lpp/Xamples/include
57343 
57344 /usr/openwin/include
57345 /usr/openwin/share/include'
57346 
57347 if test "$ac_x_includes" = no; then
57348   # Guess where to find include files, by looking for Xlib.h.
57349   # First, try using that file with no special directory specified.
57350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57351 /* end confdefs.h.  */
57352 #include <X11/Xlib.h>
57353 _ACEOF
57354 if ac_fn_cxx_try_cpp "$LINENO"; then :
57355   # We can compile using X headers with no special include directory.
57356 ac_x_includes=
57357 else
57358   for ac_dir in $ac_x_header_dirs; do
57359   if test -r "$ac_dir/X11/Xlib.h"; then
57360     ac_x_includes=$ac_dir
57361     break
57362   fi
57363 done
57364 fi
57365 rm -f conftest.err conftest.i conftest.$ac_ext
57366 fi # $ac_x_includes = no
57367 
57368 if test "$ac_x_libraries" = no; then
57369   # Check for the libraries.
57370   # See if we find them without any special options.
57371   # Don't add to $LIBS permanently.
57372   ac_save_LIBS=$LIBS
57373   LIBS="-lX11 $LIBS"
57374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57375 /* end confdefs.h.  */
57376 #include <X11/Xlib.h>
57377 int
57378 main ()
57379 {
57380 XrmInitialize ()
57381   ;
57382   return 0;
57383 }
57384 _ACEOF
57385 if ac_fn_cxx_try_link "$LINENO"; then :
57386   LIBS=$ac_save_LIBS
57387 # We can link X programs with no special library path.
57388 ac_x_libraries=
57389 else
57390   LIBS=$ac_save_LIBS
57391 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57392 do
57393   # Don't even attempt the hair of trying to link an X program!
57394   for ac_extension in a so sl dylib la dll; do
57395     if test -r "$ac_dir/libX11.$ac_extension"; then
57396       ac_x_libraries=$ac_dir
57397       break 2
57398     fi
57399   done
57400 done
57401 fi
57402 rm -f core conftest.err conftest.$ac_objext \
57403     conftest$ac_exeext conftest.$ac_ext
57404 fi # $ac_x_libraries = no
57405 
57406 case $ac_x_includes,$ac_x_libraries in #(
57407   no,* | *,no | *\'*)
57408     # Didn't find X, or a directory has "'" in its name.
57409     ac_cv_have_x="have_x=no";; #(
57410   *)
57411     # Record where we found X for the cache.
57412     ac_cv_have_x="have_x=yes\
57413         ac_x_includes='$ac_x_includes'\
57414         ac_x_libraries='$ac_x_libraries'"
57415 esac
57416 fi
57417 ;; #(
57418     *) have_x=yes;;
57419   esac
57420   eval "$ac_cv_have_x"
57421 fi # $with_x != no
57422 
57423 if test "$have_x" != yes; then
57424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57425 $as_echo "$have_x" >&6; }
57426   no_x=yes
57427 else
57428   # If each of the values was on the command line, it overrides each guess.
57429   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57430   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57431   # Update the cache value to reflect the command line values.
57432   ac_cv_have_x="have_x=yes\
57433         ac_x_includes='$x_includes'\
57434         ac_x_libraries='$x_libraries'"
57435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57436 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57437 fi
57438 
57439     if test "$no_x" = yes; then
57440   # Not all programs may use this symbol, but it does not hurt to define it.
57441 
57442 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57443 
57444   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57445 else
57446   if test -n "$x_includes"; then
57447     X_CFLAGS="$X_CFLAGS -I$x_includes"
57448   fi
57449 
57450   # It would also be nice to do this for all -L options, not just this one.
57451   if test -n "$x_libraries"; then
57452     X_LIBS="$X_LIBS -L$x_libraries"
57453     # For Solaris; some versions of Sun CC require a space after -R and
57454     # others require no space.  Words are not sufficient . . . .
57455     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57456 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
57457     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57458     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57459     ac_cxx_werror_flag=yes
57460     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57461 /* end confdefs.h.  */
57462 
57463 int
57464 main ()
57465 {
57466 
57467   ;
57468   return 0;
57469 }
57470 _ACEOF
57471 if ac_fn_cxx_try_link "$LINENO"; then :
57472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57473 $as_echo "no" >&6; }
57474        X_LIBS="$X_LIBS -R$x_libraries"
57475 else
57476   LIBS="$ac_xsave_LIBS -R $x_libraries"
57477        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57478 /* end confdefs.h.  */
57479 
57480 int
57481 main ()
57482 {
57483 
57484   ;
57485   return 0;
57486 }
57487 _ACEOF
57488 if ac_fn_cxx_try_link "$LINENO"; then :
57489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57490 $as_echo "yes" >&6; }
57491           X_LIBS="$X_LIBS -R $x_libraries"
57492 else
57493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57494 $as_echo "neither works" >&6; }
57495 fi
57496 rm -f core conftest.err conftest.$ac_objext \
57497     conftest$ac_exeext conftest.$ac_ext
57498 fi
57499 rm -f core conftest.err conftest.$ac_objext \
57500     conftest$ac_exeext conftest.$ac_ext
57501     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57502     LIBS=$ac_xsave_LIBS
57503   fi
57504 
57505   # Check for system-dependent libraries X programs must link with.
57506   # Do this before checking for the system-independent R6 libraries
57507   # (-lICE), since we may need -lsocket or whatever for X linking.
57508 
57509   if test "$ISC" = yes; then
57510     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57511   else
57512     # Martyn Johnson says this is needed for Ultrix, if the X
57513     # libraries were built with DECnet support.  And Karl Berry says
57514     # the Alpha needs dnet_stub (dnet does not exist).
57515     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57516     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57517 /* end confdefs.h.  */
57518 
57519 /* Override any GCC internal prototype to avoid an error.
57520    Use char because int might match the return type of a GCC
57521    builtin and then its argument prototype would still apply.  */
57522 #ifdef __cplusplus
57523 extern "C"
57524 #endif
57525 char XOpenDisplay ();
57526 int
57527 main ()
57528 {
57529 return XOpenDisplay ();
57530   ;
57531   return 0;
57532 }
57533 _ACEOF
57534 if ac_fn_cxx_try_link "$LINENO"; then :
57535 
57536 else
57537   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57538 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57539 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57540   $as_echo_n "(cached) " >&6
57541 else
57542   ac_check_lib_save_LIBS=$LIBS
57543 LIBS="-ldnet  $LIBS"
57544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57545 /* end confdefs.h.  */
57546 
57547 /* Override any GCC internal prototype to avoid an error.
57548    Use char because int might match the return type of a GCC
57549    builtin and then its argument prototype would still apply.  */
57550 #ifdef __cplusplus
57551 extern "C"
57552 #endif
57553 char dnet_ntoa ();
57554 int
57555 main ()
57556 {
57557 return dnet_ntoa ();
57558   ;
57559   return 0;
57560 }
57561 _ACEOF
57562 if ac_fn_cxx_try_link "$LINENO"; then :
57563   ac_cv_lib_dnet_dnet_ntoa=yes
57564 else
57565   ac_cv_lib_dnet_dnet_ntoa=no
57566 fi
57567 rm -f core conftest.err conftest.$ac_objext \
57568     conftest$ac_exeext conftest.$ac_ext
57569 LIBS=$ac_check_lib_save_LIBS
57570 fi
57571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57572 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57573 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57574   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57575 fi
57576 
57577     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57578       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57579 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57580 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57581   $as_echo_n "(cached) " >&6
57582 else
57583   ac_check_lib_save_LIBS=$LIBS
57584 LIBS="-ldnet_stub  $LIBS"
57585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57586 /* end confdefs.h.  */
57587 
57588 /* Override any GCC internal prototype to avoid an error.
57589    Use char because int might match the return type of a GCC
57590    builtin and then its argument prototype would still apply.  */
57591 #ifdef __cplusplus
57592 extern "C"
57593 #endif
57594 char dnet_ntoa ();
57595 int
57596 main ()
57597 {
57598 return dnet_ntoa ();
57599   ;
57600   return 0;
57601 }
57602 _ACEOF
57603 if ac_fn_cxx_try_link "$LINENO"; then :
57604   ac_cv_lib_dnet_stub_dnet_ntoa=yes
57605 else
57606   ac_cv_lib_dnet_stub_dnet_ntoa=no
57607 fi
57608 rm -f core conftest.err conftest.$ac_objext \
57609     conftest$ac_exeext conftest.$ac_ext
57610 LIBS=$ac_check_lib_save_LIBS
57611 fi
57612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57613 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57614 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57615   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57616 fi
57617 
57618     fi
57619 fi
57620 rm -f core conftest.err conftest.$ac_objext \
57621     conftest$ac_exeext conftest.$ac_ext
57622     LIBS="$ac_xsave_LIBS"
57623 
57624     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57625     # to get the SysV transport functions.
57626     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57627     # needs -lnsl.
57628     # The nsl library prevents programs from opening the X display
57629     # on Irix 5.2, according to T.E. Dickey.
57630     # The functions gethostbyname, getservbyname, and inet_addr are
57631     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57632     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57633 if test "x$ac_cv_func_gethostbyname" = xyes; then :
57634 
57635 fi
57636 
57637     if test $ac_cv_func_gethostbyname = no; then
57638       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57639 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57640 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57641   $as_echo_n "(cached) " >&6
57642 else
57643   ac_check_lib_save_LIBS=$LIBS
57644 LIBS="-lnsl  $LIBS"
57645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57646 /* end confdefs.h.  */
57647 
57648 /* Override any GCC internal prototype to avoid an error.
57649    Use char because int might match the return type of a GCC
57650    builtin and then its argument prototype would still apply.  */
57651 #ifdef __cplusplus
57652 extern "C"
57653 #endif
57654 char gethostbyname ();
57655 int
57656 main ()
57657 {
57658 return gethostbyname ();
57659   ;
57660   return 0;
57661 }
57662 _ACEOF
57663 if ac_fn_cxx_try_link "$LINENO"; then :
57664   ac_cv_lib_nsl_gethostbyname=yes
57665 else
57666   ac_cv_lib_nsl_gethostbyname=no
57667 fi
57668 rm -f core conftest.err conftest.$ac_objext \
57669     conftest$ac_exeext conftest.$ac_ext
57670 LIBS=$ac_check_lib_save_LIBS
57671 fi
57672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57673 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57674 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57675   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57676 fi
57677 
57678       if test $ac_cv_lib_nsl_gethostbyname = no; then
57679         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57680 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57681 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57682   $as_echo_n "(cached) " >&6
57683 else
57684   ac_check_lib_save_LIBS=$LIBS
57685 LIBS="-lbsd  $LIBS"
57686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57687 /* end confdefs.h.  */
57688 
57689 /* Override any GCC internal prototype to avoid an error.
57690    Use char because int might match the return type of a GCC
57691    builtin and then its argument prototype would still apply.  */
57692 #ifdef __cplusplus
57693 extern "C"
57694 #endif
57695 char gethostbyname ();
57696 int
57697 main ()
57698 {
57699 return gethostbyname ();
57700   ;
57701   return 0;
57702 }
57703 _ACEOF
57704 if ac_fn_cxx_try_link "$LINENO"; then :
57705   ac_cv_lib_bsd_gethostbyname=yes
57706 else
57707   ac_cv_lib_bsd_gethostbyname=no
57708 fi
57709 rm -f core conftest.err conftest.$ac_objext \
57710     conftest$ac_exeext conftest.$ac_ext
57711 LIBS=$ac_check_lib_save_LIBS
57712 fi
57713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57714 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57715 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57716   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57717 fi
57718 
57719       fi
57720     fi
57721 
57722     # lieder@skyler.mavd.honeywell.com says without -lsocket,
57723     # socket/setsockopt and other routines are undefined under SCO ODT
57724     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57725     # on later versions), says Simon Leinen: it contains gethostby*
57726     # variants that don't use the name server (or something).  -lsocket
57727     # must be given before -lnsl if both are needed.  We assume that
57728     # if connect needs -lnsl, so does gethostbyname.
57729     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57730 if test "x$ac_cv_func_connect" = xyes; then :
57731 
57732 fi
57733 
57734     if test $ac_cv_func_connect = no; then
57735       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57736 $as_echo_n "checking for connect in -lsocket... " >&6; }
57737 if ${ac_cv_lib_socket_connect+:} false; then :
57738   $as_echo_n "(cached) " >&6
57739 else
57740   ac_check_lib_save_LIBS=$LIBS
57741 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57743 /* end confdefs.h.  */
57744 
57745 /* Override any GCC internal prototype to avoid an error.
57746    Use char because int might match the return type of a GCC
57747    builtin and then its argument prototype would still apply.  */
57748 #ifdef __cplusplus
57749 extern "C"
57750 #endif
57751 char connect ();
57752 int
57753 main ()
57754 {
57755 return connect ();
57756   ;
57757   return 0;
57758 }
57759 _ACEOF
57760 if ac_fn_cxx_try_link "$LINENO"; then :
57761   ac_cv_lib_socket_connect=yes
57762 else
57763   ac_cv_lib_socket_connect=no
57764 fi
57765 rm -f core conftest.err conftest.$ac_objext \
57766     conftest$ac_exeext conftest.$ac_ext
57767 LIBS=$ac_check_lib_save_LIBS
57768 fi
57769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57770 $as_echo "$ac_cv_lib_socket_connect" >&6; }
57771 if test "x$ac_cv_lib_socket_connect" = xyes; then :
57772   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57773 fi
57774 
57775     fi
57776 
57777     # Guillermo Gomez says -lposix is necessary on A/UX.
57778     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57779 if test "x$ac_cv_func_remove" = xyes; then :
57780 
57781 fi
57782 
57783     if test $ac_cv_func_remove = no; then
57784       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57785 $as_echo_n "checking for remove in -lposix... " >&6; }
57786 if ${ac_cv_lib_posix_remove+:} false; then :
57787   $as_echo_n "(cached) " >&6
57788 else
57789   ac_check_lib_save_LIBS=$LIBS
57790 LIBS="-lposix  $LIBS"
57791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57792 /* end confdefs.h.  */
57793 
57794 /* Override any GCC internal prototype to avoid an error.
57795    Use char because int might match the return type of a GCC
57796    builtin and then its argument prototype would still apply.  */
57797 #ifdef __cplusplus
57798 extern "C"
57799 #endif
57800 char remove ();
57801 int
57802 main ()
57803 {
57804 return remove ();
57805   ;
57806   return 0;
57807 }
57808 _ACEOF
57809 if ac_fn_cxx_try_link "$LINENO"; then :
57810   ac_cv_lib_posix_remove=yes
57811 else
57812   ac_cv_lib_posix_remove=no
57813 fi
57814 rm -f core conftest.err conftest.$ac_objext \
57815     conftest$ac_exeext conftest.$ac_ext
57816 LIBS=$ac_check_lib_save_LIBS
57817 fi
57818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57819 $as_echo "$ac_cv_lib_posix_remove" >&6; }
57820 if test "x$ac_cv_lib_posix_remove" = xyes; then :
57821   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57822 fi
57823 
57824     fi
57825 
57826     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57827     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57828 if test "x$ac_cv_func_shmat" = xyes; then :
57829 
57830 fi
57831 
57832     if test $ac_cv_func_shmat = no; then
57833       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57834 $as_echo_n "checking for shmat in -lipc... " >&6; }
57835 if ${ac_cv_lib_ipc_shmat+:} false; then :
57836   $as_echo_n "(cached) " >&6
57837 else
57838   ac_check_lib_save_LIBS=$LIBS
57839 LIBS="-lipc  $LIBS"
57840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57841 /* end confdefs.h.  */
57842 
57843 /* Override any GCC internal prototype to avoid an error.
57844    Use char because int might match the return type of a GCC
57845    builtin and then its argument prototype would still apply.  */
57846 #ifdef __cplusplus
57847 extern "C"
57848 #endif
57849 char shmat ();
57850 int
57851 main ()
57852 {
57853 return shmat ();
57854   ;
57855   return 0;
57856 }
57857 _ACEOF
57858 if ac_fn_cxx_try_link "$LINENO"; then :
57859   ac_cv_lib_ipc_shmat=yes
57860 else
57861   ac_cv_lib_ipc_shmat=no
57862 fi
57863 rm -f core conftest.err conftest.$ac_objext \
57864     conftest$ac_exeext conftest.$ac_ext
57865 LIBS=$ac_check_lib_save_LIBS
57866 fi
57867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57868 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57869 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57870   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57871 fi
57872 
57873     fi
57874   fi
57875 
57876   # Check for libraries that X11R6 Xt/Xaw programs need.
57877   ac_save_LDFLAGS=$LDFLAGS
57878   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57879   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57880   # check for ICE first), but we must link in the order -lSM -lICE or
57881   # we get undefined symbols.  So assume we have SM if we have ICE.
57882   # These have to be linked with before -lX11, unlike the other
57883   # libraries we check for below, so use a different variable.
57884   # John Interrante, Karl Berry
57885   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57886 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57887 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57888   $as_echo_n "(cached) " >&6
57889 else
57890   ac_check_lib_save_LIBS=$LIBS
57891 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57893 /* end confdefs.h.  */
57894 
57895 /* Override any GCC internal prototype to avoid an error.
57896    Use char because int might match the return type of a GCC
57897    builtin and then its argument prototype would still apply.  */
57898 #ifdef __cplusplus
57899 extern "C"
57900 #endif
57901 char IceConnectionNumber ();
57902 int
57903 main ()
57904 {
57905 return IceConnectionNumber ();
57906   ;
57907   return 0;
57908 }
57909 _ACEOF
57910 if ac_fn_cxx_try_link "$LINENO"; then :
57911   ac_cv_lib_ICE_IceConnectionNumber=yes
57912 else
57913   ac_cv_lib_ICE_IceConnectionNumber=no
57914 fi
57915 rm -f core conftest.err conftest.$ac_objext \
57916     conftest$ac_exeext conftest.$ac_ext
57917 LIBS=$ac_check_lib_save_LIBS
57918 fi
57919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57920 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57921 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57922   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57923 fi
57924 
57925   LDFLAGS=$ac_save_LDFLAGS
57926 
57927 fi
57928 
57929 
57930     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57931     # this doesn't make sense so we remove it.
57932     if test "x$COMPILE_TYPE" = xcross; then
57933       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57934     fi
57935 
57936     if test "x$no_x" = xyes; then
57937 
57938   # Print a helpful message on how to acquire the necessary build dependency.
57939   # x11 is the help tag: freetype, cups, alsa etc
57940   MISSING_DEPENDENCY=x11
57941 
57942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57943     cygwin_help $MISSING_DEPENDENCY
57944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57945     msys_help $MISSING_DEPENDENCY
57946   else
57947     PKGHANDLER_COMMAND=
57948 
57949     case $PKGHANDLER in
57950       apt-get)
57951         apt_help     $MISSING_DEPENDENCY ;;
57952       yum)
57953         yum_help     $MISSING_DEPENDENCY ;;
57954       brew)
57955         brew_help    $MISSING_DEPENDENCY ;;
57956       port)
57957         port_help    $MISSING_DEPENDENCY ;;
57958       pkgutil)
57959         pkgutil_help $MISSING_DEPENDENCY ;;
57960       pkgadd)
57961         pkgadd_help  $MISSING_DEPENDENCY ;;
57962     esac
57963 
57964     if test "x$PKGHANDLER_COMMAND" != x; then
57965       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57966     fi
57967   fi
57968 
57969       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57970     fi
57971 
57972     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57973       OPENWIN_HOME="/usr/openwin"
57974       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57975       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57976           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57977     fi
57978 
57979     ac_ext=c
57980 ac_cpp='$CPP $CPPFLAGS'
57981 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57982 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57983 ac_compiler_gnu=$ac_cv_c_compiler_gnu
57984 
57985     OLD_CFLAGS="$CFLAGS"
57986     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57987 
57988     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57989     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57990 do :
57991   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57992 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57993           # include <X11/Xlib.h>
57994           # include <X11/Xutil.h>
57995 
57996 
57997 "
57998 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57999   cat >>confdefs.h <<_ACEOF
58000 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58001 _ACEOF
58002  X11_HEADERS_OK=yes
58003 else
58004   X11_HEADERS_OK=no; break
58005 fi
58006 
58007 done
58008 
58009 
58010     if test "x$X11_HEADERS_OK" = xno; then
58011 
58012   # Print a helpful message on how to acquire the necessary build dependency.
58013   # x11 is the help tag: freetype, cups, alsa etc
58014   MISSING_DEPENDENCY=x11
58015 
58016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58017     cygwin_help $MISSING_DEPENDENCY
58018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58019     msys_help $MISSING_DEPENDENCY
58020   else
58021     PKGHANDLER_COMMAND=
58022 
58023     case $PKGHANDLER in
58024       apt-get)
58025         apt_help     $MISSING_DEPENDENCY ;;
58026       yum)
58027         yum_help     $MISSING_DEPENDENCY ;;
58028       brew)
58029         brew_help    $MISSING_DEPENDENCY ;;
58030       port)
58031         port_help    $MISSING_DEPENDENCY ;;
58032       pkgutil)
58033         pkgutil_help $MISSING_DEPENDENCY ;;
58034       pkgadd)
58035         pkgadd_help  $MISSING_DEPENDENCY ;;
58036     esac
58037 
58038     if test "x$PKGHANDLER_COMMAND" != x; then
58039       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58040     fi
58041   fi
58042 
58043       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
58044     fi
58045 
58046     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
58047     # defined in libawt_xawt.
58048     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
58049 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
58050     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58051 /* end confdefs.h.  */
58052 #include <X11/extensions/Xrender.h>
58053 int
58054 main ()
58055 {
58056 XLinearGradient x;
58057   ;
58058   return 0;
58059 }
58060 _ACEOF
58061 if ac_fn_c_try_compile "$LINENO"; then :
58062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58063 $as_echo "yes" >&6; }
58064 else
58065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58066 $as_echo "no" >&6; }
58067          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
58068 fi
58069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58070 
58071     CFLAGS="$OLD_CFLAGS"
58072     ac_ext=cpp
58073 ac_cpp='$CXXCPP $CPPFLAGS'
58074 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58075 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58076 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58077 
58078   fi # NEEDS_LIB_X11
58079 
58080 
58081 
58082 
58083 
58084 
58085 # Check whether --with-cups was given.
58086 if test "${with_cups+set}" = set; then :
58087   withval=$with_cups;
58088 fi
58089 
58090 
58091 # Check whether --with-cups-include was given.
58092 if test "${with_cups_include+set}" = set; then :
58093   withval=$with_cups_include;
58094 fi
58095 
58096 
58097   if test "x$NEEDS_LIB_CUPS" = xfalse; then
58098     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
58099         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
58100       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
58101 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
58102     fi
58103     CUPS_CFLAGS=
58104   else
58105     CUPS_FOUND=no
58106 
58107     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
58108       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
58109     fi
58110 
58111     if test "x${with_cups}" != x; then
58112       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58113 $as_echo_n "checking for cups headers... " >&6; }
58114       if test -s "${with_cups}/include/cups/cups.h"; then
58115         CUPS_CFLAGS="-I${with_cups}/include"
58116         CUPS_FOUND=yes
58117         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58118 $as_echo "$CUPS_FOUND" >&6; }
58119       else
58120         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
58121       fi
58122     fi
58123     if test "x${with_cups_include}" != x; then
58124       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58125 $as_echo_n "checking for cups headers... " >&6; }
58126       if test -s "${with_cups_include}/cups/cups.h"; then
58127         CUPS_CFLAGS="-I${with_cups_include}"
58128         CUPS_FOUND=yes
58129         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58130 $as_echo "$CUPS_FOUND" >&6; }
58131       else
58132         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
58133       fi
58134     fi
58135     if test "x$CUPS_FOUND" = xno; then
58136       # Are the cups headers installed in the default /usr/include location?
58137       for ac_header in cups/cups.h cups/ppd.h
58138 do :
58139   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58140 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
58141 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58142   cat >>confdefs.h <<_ACEOF
58143 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58144 _ACEOF
58145 
58146           CUPS_FOUND=yes
58147           CUPS_CFLAGS=
58148           DEFAULT_CUPS=yes
58149 
58150 fi
58151 
58152 done
58153 
58154     fi
58155     if test "x$CUPS_FOUND" = xno; then
58156 
58157   # Print a helpful message on how to acquire the necessary build dependency.
58158   # cups is the help tag: freetype, cups, alsa etc
58159   MISSING_DEPENDENCY=cups
58160 
58161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58162     cygwin_help $MISSING_DEPENDENCY
58163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58164     msys_help $MISSING_DEPENDENCY
58165   else
58166     PKGHANDLER_COMMAND=
58167 
58168     case $PKGHANDLER in
58169       apt-get)
58170         apt_help     $MISSING_DEPENDENCY ;;
58171       yum)
58172         yum_help     $MISSING_DEPENDENCY ;;
58173       brew)
58174         brew_help    $MISSING_DEPENDENCY ;;
58175       port)
58176         port_help    $MISSING_DEPENDENCY ;;
58177       pkgutil)
58178         pkgutil_help $MISSING_DEPENDENCY ;;
58179       pkgadd)
58180         pkgadd_help  $MISSING_DEPENDENCY ;;
58181     esac
58182 
58183     if test "x$PKGHANDLER_COMMAND" != x; then
58184       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58185     fi
58186   fi
58187 
58188       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
58189     fi
58190   fi
58191 
58192 
58193 
58194 
58195 
58196 # Check whether --with-freetype was given.
58197 if test "${with_freetype+set}" = set; then :
58198   withval=$with_freetype;
58199 fi
58200 
58201 
58202 # Check whether --with-freetype-include was given.
58203 if test "${with_freetype_include+set}" = set; then :
58204   withval=$with_freetype_include;
58205 fi
58206 
58207 
58208 # Check whether --with-freetype-lib was given.
58209 if test "${with_freetype_lib+set}" = set; then :
58210   withval=$with_freetype_lib;
58211 fi
58212 
58213 
58214 # Check whether --with-freetype-src was given.
58215 if test "${with_freetype_src+set}" = set; then :
58216   withval=$with_freetype_src;
58217 fi
58218 
58219   # Check whether --enable-freetype-bundling was given.
58220 if test "${enable_freetype_bundling+set}" = set; then :
58221   enableval=$enable_freetype_bundling;
58222 fi
58223 
58224 
58225 # Check whether --with-freetype-license was given.
58226 if test "${with_freetype_license+set}" = set; then :
58227   withval=$with_freetype_license;
58228 fi
58229 
58230 
58231   # Need to specify explicitly since it needs to be overridden on some versions of macosx
58232   FREETYPE_BASE_NAME=freetype
58233   FREETYPE_CFLAGS=
58234   FREETYPE_LIBS=
58235   FREETYPE_BUNDLE_LIB_PATH=
58236 
58237   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
58238     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
58239         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
58240         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
58241         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
58242       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
58243 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
58244     fi
58245     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
58246       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
58247 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
58248     fi
58249   else
58250     # freetype is needed to build; go get it!
58251 
58252     BUNDLE_FREETYPE="$enable_freetype_bundling"
58253 
58254     if  test "x$with_freetype_src" != x; then
58255       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58256         # Try to build freetype if --with-freetype-src was given on Windows
58257 
58258   FREETYPE_SRC_PATH="$with_freetype_src"
58259   BUILD_FREETYPE=yes
58260 
58261   # Check if the freetype sources are acessible..
58262   if ! test -d $FREETYPE_SRC_PATH; then
58263     { $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
58264 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58265     BUILD_FREETYPE=no
58266   fi
58267   # ..and contain a vc2010 project file
58268   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58269   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58270     { $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
58271 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58272     BUILD_FREETYPE=no
58273   fi
58274   # Now check if configure found a version of 'msbuild.exe'
58275   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58276     { $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
58277 $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;}
58278     BUILD_FREETYPE=no
58279   fi
58280 
58281   # Ready to go..
58282   if test "x$BUILD_FREETYPE" = xyes; then
58283     # msbuild requires trailing slashes for output directories
58284     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58285     freetype_lib_path_unix="$freetype_lib_path"
58286     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58287 
58288   unix_path="$vcxproj_path"
58289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58290     windows_path=`$CYGPATH -m "$unix_path"`
58291     vcxproj_path="$windows_path"
58292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58293     windows_path=`cmd //c echo $unix_path`
58294     vcxproj_path="$windows_path"
58295   fi
58296 
58297 
58298   unix_path="$freetype_lib_path"
58299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58300     windows_path=`$CYGPATH -m "$unix_path"`
58301     freetype_lib_path="$windows_path"
58302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58303     windows_path=`cmd //c echo $unix_path`
58304     freetype_lib_path="$windows_path"
58305   fi
58306 
58307 
58308   unix_path="$freetype_obj_path"
58309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58310     windows_path=`$CYGPATH -m "$unix_path"`
58311     freetype_obj_path="$windows_path"
58312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58313     windows_path=`cmd //c echo $unix_path`
58314     freetype_obj_path="$windows_path"
58315   fi
58316 
58317     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58318       freetype_platform=x64
58319     else
58320       freetype_platform=win32
58321     fi
58322 
58323     # The original freetype project file is for VS 2010 (i.e. 'v100'),
58324     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58325     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58326     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58327     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58328 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58329 
58330     # First we try to build the freetype.dll
58331     $ECHO -e "@echo off\n"\
58332         "$MSBUILD $vcxproj_path "\
58333         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58334         "/p:Configuration=\"Release Multithreaded\" "\
58335         "/p:Platform=$freetype_platform "\
58336         "/p:ConfigurationType=DynamicLibrary "\
58337         "/p:TargetName=freetype "\
58338         "/p:OutDir=\"$freetype_lib_path\" "\
58339         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58340     cmd /c freetype.bat
58341 
58342     if test -s "$freetype_lib_path_unix/freetype.dll"; then
58343       # If that succeeds we also build freetype.lib
58344       $ECHO -e "@echo off\n"\
58345           "$MSBUILD $vcxproj_path "\
58346           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58347           "/p:Configuration=\"Release Multithreaded\" "\
58348           "/p:Platform=$freetype_platform "\
58349           "/p:ConfigurationType=StaticLibrary "\
58350           "/p:TargetName=freetype "\
58351           "/p:OutDir=\"$freetype_lib_path\" "\
58352           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58353       cmd /c freetype.bat
58354 
58355       if test -s "$freetype_lib_path_unix/freetype.lib"; then
58356         # Once we build both, lib and dll, set freetype lib and include path appropriately
58357         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58358         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58359         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58360 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58361       else
58362         BUILD_FREETYPE=no
58363       fi
58364     else
58365       BUILD_FREETYPE=no
58366     fi
58367   fi
58368 
58369         if test "x$BUILD_FREETYPE" = xyes; then
58370           # Okay, we built it. Check that it works.
58371 
58372   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58373   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58374   METHOD="--with-freetype-src"
58375 
58376   # Let's start with an optimistic view of the world :-)
58377   FOUND_FREETYPE=yes
58378 
58379   # First look for the canonical freetype main include file ft2build.h.
58380   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58381     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58382     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58383     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58384       # Fail.
58385       FOUND_FREETYPE=no
58386     fi
58387   fi
58388 
58389   if test "x$FOUND_FREETYPE" = xyes; then
58390     # Include file found, let's continue the sanity check.
58391     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58392 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58393 
58394     # Reset to default value
58395     FREETYPE_BASE_NAME=freetype
58396     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58397     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58398       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58399           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58400         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58401         # for the .6 version explicitly.
58402         FREETYPE_BASE_NAME=freetype.6
58403         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58404         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58405 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58406       else
58407         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58408 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58409         FOUND_FREETYPE=no
58410       fi
58411     else
58412       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58413         # On Windows, we will need both .lib and .dll file.
58414         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58415           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58416 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58417           FOUND_FREETYPE=no
58418         fi
58419       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58420           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58421         # Found lib in isa dir, use that instead.
58422         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58423         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58424 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58425       fi
58426     fi
58427   fi
58428 
58429   if test "x$FOUND_FREETYPE" = xyes; then
58430 
58431   # Only process if variable expands to non-empty
58432 
58433   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58434     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58435 
58436   # Input might be given as Windows format, start by converting to
58437   # unix format.
58438   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58439   new_path=`$CYGPATH -u "$path"`
58440 
58441   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58442   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58443   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58444   # "foo.exe" is OK but "foo" is an error.
58445   #
58446   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58447   # It is also a way to make sure we got the proper file name for the real test later on.
58448   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58449   if test "x$test_shortpath" = x; then
58450     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58451 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58452     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58453   fi
58454 
58455   # Call helper function which possibly converts this using DOS-style short mode.
58456   # If so, the updated path is stored in $new_path.
58457 
58458   input_path="$new_path"
58459   # Check if we need to convert this using DOS-style short mode. If the path
58460   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58461   # take no chances and rewrite it.
58462   # Note: m4 eats our [], so we need to use [ and ] instead.
58463   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58464   if test "x$has_forbidden_chars" != x; then
58465     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58466     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58467     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58468     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58469       # Going to short mode and back again did indeed matter. Since short mode is
58470       # case insensitive, let's make it lowercase to improve readability.
58471       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58472       # Now convert it back to Unix-style (cygpath)
58473       input_path=`$CYGPATH -u "$shortmode_path"`
58474       new_path="$input_path"
58475     fi
58476   fi
58477 
58478   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58479   if test "x$test_cygdrive_prefix" = x; then
58480     # As a simple fix, exclude /usr/bin since it's not a real path.
58481     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58482       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58483       # a path prefixed by /cygdrive for fixpath to work.
58484       new_path="$CYGWIN_ROOT_PATH$input_path"
58485     fi
58486   fi
58487 
58488 
58489   if test "x$path" != "x$new_path"; then
58490     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58491     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58492 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58493   fi
58494 
58495     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58496 
58497   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58498   has_colon=`$ECHO $path | $GREP ^.:`
58499   new_path="$path"
58500   if test "x$has_colon" = x; then
58501     # Not in mixed or Windows style, start by that.
58502     new_path=`cmd //c echo $path`
58503   fi
58504 
58505 
58506   input_path="$new_path"
58507   # Check if we need to convert this using DOS-style short mode. If the path
58508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58509   # take no chances and rewrite it.
58510   # Note: m4 eats our [], so we need to use [ and ] instead.
58511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58512   if test "x$has_forbidden_chars" != x; then
58513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58514     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58515   fi
58516 
58517 
58518   windows_path="$new_path"
58519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58520     unix_path=`$CYGPATH -u "$windows_path"`
58521     new_path="$unix_path"
58522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58523     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58524     new_path="$unix_path"
58525   fi
58526 
58527   if test "x$path" != "x$new_path"; then
58528     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58529     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58530 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58531   fi
58532 
58533   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58534   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58535 
58536     else
58537       # We're on a unix platform. Hooray! :)
58538       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58539       has_space=`$ECHO "$path" | $GREP " "`
58540       if test "x$has_space" != x; then
58541         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58542 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58543         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58544       fi
58545 
58546       # Use eval to expand a potential ~
58547       eval path="$path"
58548       if test ! -f "$path" && test ! -d "$path"; then
58549         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58550       fi
58551 
58552       if test -d "$path"; then
58553         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58554       else
58555         dir="`$DIRNAME "$path"`"
58556         base="`$BASENAME "$path"`"
58557         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58558       fi
58559     fi
58560   fi
58561 
58562 
58563   # Only process if variable expands to non-empty
58564 
58565   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58566     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58567 
58568   # Input might be given as Windows format, start by converting to
58569   # unix format.
58570   path="$POTENTIAL_FREETYPE_LIB_PATH"
58571   new_path=`$CYGPATH -u "$path"`
58572 
58573   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58574   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58575   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58576   # "foo.exe" is OK but "foo" is an error.
58577   #
58578   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58579   # It is also a way to make sure we got the proper file name for the real test later on.
58580   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58581   if test "x$test_shortpath" = x; then
58582     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58583 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58584     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58585   fi
58586 
58587   # Call helper function which possibly converts this using DOS-style short mode.
58588   # If so, the updated path is stored in $new_path.
58589 
58590   input_path="$new_path"
58591   # Check if we need to convert this using DOS-style short mode. If the path
58592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58593   # take no chances and rewrite it.
58594   # Note: m4 eats our [], so we need to use [ and ] instead.
58595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58596   if test "x$has_forbidden_chars" != x; then
58597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58601       # Going to short mode and back again did indeed matter. Since short mode is
58602       # case insensitive, let's make it lowercase to improve readability.
58603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58604       # Now convert it back to Unix-style (cygpath)
58605       input_path=`$CYGPATH -u "$shortmode_path"`
58606       new_path="$input_path"
58607     fi
58608   fi
58609 
58610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58611   if test "x$test_cygdrive_prefix" = x; then
58612     # As a simple fix, exclude /usr/bin since it's not a real path.
58613     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58615       # a path prefixed by /cygdrive for fixpath to work.
58616       new_path="$CYGWIN_ROOT_PATH$input_path"
58617     fi
58618   fi
58619 
58620 
58621   if test "x$path" != "x$new_path"; then
58622     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58624 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58625   fi
58626 
58627     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58628 
58629   path="$POTENTIAL_FREETYPE_LIB_PATH"
58630   has_colon=`$ECHO $path | $GREP ^.:`
58631   new_path="$path"
58632   if test "x$has_colon" = x; then
58633     # Not in mixed or Windows style, start by that.
58634     new_path=`cmd //c echo $path`
58635   fi
58636 
58637 
58638   input_path="$new_path"
58639   # Check if we need to convert this using DOS-style short mode. If the path
58640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58641   # take no chances and rewrite it.
58642   # Note: m4 eats our [], so we need to use [ and ] instead.
58643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58644   if test "x$has_forbidden_chars" != x; then
58645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58646     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58647   fi
58648 
58649 
58650   windows_path="$new_path"
58651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58652     unix_path=`$CYGPATH -u "$windows_path"`
58653     new_path="$unix_path"
58654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58656     new_path="$unix_path"
58657   fi
58658 
58659   if test "x$path" != "x$new_path"; then
58660     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58661     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58662 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58663   fi
58664 
58665   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58666   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58667 
58668     else
58669       # We're on a unix platform. Hooray! :)
58670       path="$POTENTIAL_FREETYPE_LIB_PATH"
58671       has_space=`$ECHO "$path" | $GREP " "`
58672       if test "x$has_space" != x; then
58673         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58674 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58675         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58676       fi
58677 
58678       # Use eval to expand a potential ~
58679       eval path="$path"
58680       if test ! -f "$path" && test ! -d "$path"; then
58681         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58682       fi
58683 
58684       if test -d "$path"; then
58685         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58686       else
58687         dir="`$DIRNAME "$path"`"
58688         base="`$BASENAME "$path"`"
58689         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58690       fi
58691     fi
58692   fi
58693 
58694 
58695     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58696     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58697 $as_echo_n "checking for freetype includes... " >&6; }
58698     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58699 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58700     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58701     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58702 $as_echo_n "checking for freetype libraries... " >&6; }
58703     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58704 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58705   fi
58706 
58707           if test "x$FOUND_FREETYPE" != xyes; then
58708             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58709           fi
58710         else
58711           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58712 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58713           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58714         fi
58715       else
58716         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58717 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58718       fi
58719     fi
58720 
58721     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58722       # User has specified settings
58723 
58724       if test "x$BUNDLE_FREETYPE" = x; then
58725         # If not specified, default is to bundle freetype
58726         BUNDLE_FREETYPE=yes
58727       fi
58728 
58729       if test "x$with_freetype" != x; then
58730         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58731         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58732       fi
58733 
58734       # Allow --with-freetype-lib and --with-freetype-include to override
58735       if test "x$with_freetype_include" != x; then
58736         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58737       fi
58738       if test "x$with_freetype_lib" != x; then
58739         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58740       fi
58741 
58742       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58743         # Okay, we got it. Check that it works.
58744 
58745   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58746   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58747   METHOD="--with-freetype"
58748 
58749   # Let's start with an optimistic view of the world :-)
58750   FOUND_FREETYPE=yes
58751 
58752   # First look for the canonical freetype main include file ft2build.h.
58753   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58754     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58755     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58756     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58757       # Fail.
58758       FOUND_FREETYPE=no
58759     fi
58760   fi
58761 
58762   if test "x$FOUND_FREETYPE" = xyes; then
58763     # Include file found, let's continue the sanity check.
58764     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58765 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58766 
58767     # Reset to default value
58768     FREETYPE_BASE_NAME=freetype
58769     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58770     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58771       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58772           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58773         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58774         # for the .6 version explicitly.
58775         FREETYPE_BASE_NAME=freetype.6
58776         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58777         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58778 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58779       else
58780         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58781 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58782         FOUND_FREETYPE=no
58783       fi
58784     else
58785       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58786         # On Windows, we will need both .lib and .dll file.
58787         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58788           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58789 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58790           FOUND_FREETYPE=no
58791         fi
58792       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58793           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58794         # Found lib in isa dir, use that instead.
58795         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58796         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58797 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58798       fi
58799     fi
58800   fi
58801 
58802   if test "x$FOUND_FREETYPE" = xyes; then
58803 
58804   # Only process if variable expands to non-empty
58805 
58806   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58807     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58808 
58809   # Input might be given as Windows format, start by converting to
58810   # unix format.
58811   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58812   new_path=`$CYGPATH -u "$path"`
58813 
58814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58817   # "foo.exe" is OK but "foo" is an error.
58818   #
58819   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58820   # It is also a way to make sure we got the proper file name for the real test later on.
58821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58822   if test "x$test_shortpath" = x; then
58823     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58824 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58825     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58826   fi
58827 
58828   # Call helper function which possibly converts this using DOS-style short mode.
58829   # If so, the updated path is stored in $new_path.
58830 
58831   input_path="$new_path"
58832   # Check if we need to convert this using DOS-style short mode. If the path
58833   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58834   # take no chances and rewrite it.
58835   # Note: m4 eats our [], so we need to use [ and ] instead.
58836   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58837   if test "x$has_forbidden_chars" != x; then
58838     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58839     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58840     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58841     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58842       # Going to short mode and back again did indeed matter. Since short mode is
58843       # case insensitive, let's make it lowercase to improve readability.
58844       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58845       # Now convert it back to Unix-style (cygpath)
58846       input_path=`$CYGPATH -u "$shortmode_path"`
58847       new_path="$input_path"
58848     fi
58849   fi
58850 
58851   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58852   if test "x$test_cygdrive_prefix" = x; then
58853     # As a simple fix, exclude /usr/bin since it's not a real path.
58854     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58855       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58856       # a path prefixed by /cygdrive for fixpath to work.
58857       new_path="$CYGWIN_ROOT_PATH$input_path"
58858     fi
58859   fi
58860 
58861 
58862   if test "x$path" != "x$new_path"; then
58863     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58864     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58865 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58866   fi
58867 
58868     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58869 
58870   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58871   has_colon=`$ECHO $path | $GREP ^.:`
58872   new_path="$path"
58873   if test "x$has_colon" = x; then
58874     # Not in mixed or Windows style, start by that.
58875     new_path=`cmd //c echo $path`
58876   fi
58877 
58878 
58879   input_path="$new_path"
58880   # Check if we need to convert this using DOS-style short mode. If the path
58881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58882   # take no chances and rewrite it.
58883   # Note: m4 eats our [], so we need to use [ and ] instead.
58884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58885   if test "x$has_forbidden_chars" != x; then
58886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58887     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58888   fi
58889 
58890 
58891   windows_path="$new_path"
58892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58893     unix_path=`$CYGPATH -u "$windows_path"`
58894     new_path="$unix_path"
58895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58897     new_path="$unix_path"
58898   fi
58899 
58900   if test "x$path" != "x$new_path"; then
58901     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58903 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58904   fi
58905 
58906   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58907   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58908 
58909     else
58910       # We're on a unix platform. Hooray! :)
58911       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58912       has_space=`$ECHO "$path" | $GREP " "`
58913       if test "x$has_space" != x; then
58914         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58915 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58916         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58917       fi
58918 
58919       # Use eval to expand a potential ~
58920       eval path="$path"
58921       if test ! -f "$path" && test ! -d "$path"; then
58922         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58923       fi
58924 
58925       if test -d "$path"; then
58926         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58927       else
58928         dir="`$DIRNAME "$path"`"
58929         base="`$BASENAME "$path"`"
58930         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58931       fi
58932     fi
58933   fi
58934 
58935 
58936   # Only process if variable expands to non-empty
58937 
58938   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58939     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58940 
58941   # Input might be given as Windows format, start by converting to
58942   # unix format.
58943   path="$POTENTIAL_FREETYPE_LIB_PATH"
58944   new_path=`$CYGPATH -u "$path"`
58945 
58946   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58947   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58948   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58949   # "foo.exe" is OK but "foo" is an error.
58950   #
58951   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58952   # It is also a way to make sure we got the proper file name for the real test later on.
58953   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58954   if test "x$test_shortpath" = x; then
58955     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58956 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58957     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58958   fi
58959 
58960   # Call helper function which possibly converts this using DOS-style short mode.
58961   # If so, the updated path is stored in $new_path.
58962 
58963   input_path="$new_path"
58964   # Check if we need to convert this using DOS-style short mode. If the path
58965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58966   # take no chances and rewrite it.
58967   # Note: m4 eats our [], so we need to use [ and ] instead.
58968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58969   if test "x$has_forbidden_chars" != x; then
58970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58971     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58972     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58973     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58974       # Going to short mode and back again did indeed matter. Since short mode is
58975       # case insensitive, let's make it lowercase to improve readability.
58976       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58977       # Now convert it back to Unix-style (cygpath)
58978       input_path=`$CYGPATH -u "$shortmode_path"`
58979       new_path="$input_path"
58980     fi
58981   fi
58982 
58983   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58984   if test "x$test_cygdrive_prefix" = x; then
58985     # As a simple fix, exclude /usr/bin since it's not a real path.
58986     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58987       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58988       # a path prefixed by /cygdrive for fixpath to work.
58989       new_path="$CYGWIN_ROOT_PATH$input_path"
58990     fi
58991   fi
58992 
58993 
58994   if test "x$path" != "x$new_path"; then
58995     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58996     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58997 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58998   fi
58999 
59000     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59001 
59002   path="$POTENTIAL_FREETYPE_LIB_PATH"
59003   has_colon=`$ECHO $path | $GREP ^.:`
59004   new_path="$path"
59005   if test "x$has_colon" = x; then
59006     # Not in mixed or Windows style, start by that.
59007     new_path=`cmd //c echo $path`
59008   fi
59009 
59010 
59011   input_path="$new_path"
59012   # Check if we need to convert this using DOS-style short mode. If the path
59013   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59014   # take no chances and rewrite it.
59015   # Note: m4 eats our [], so we need to use [ and ] instead.
59016   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59017   if test "x$has_forbidden_chars" != x; then
59018     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59019     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59020   fi
59021 
59022 
59023   windows_path="$new_path"
59024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59025     unix_path=`$CYGPATH -u "$windows_path"`
59026     new_path="$unix_path"
59027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59029     new_path="$unix_path"
59030   fi
59031 
59032   if test "x$path" != "x$new_path"; then
59033     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59034     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59035 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59036   fi
59037 
59038   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59039   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59040 
59041     else
59042       # We're on a unix platform. Hooray! :)
59043       path="$POTENTIAL_FREETYPE_LIB_PATH"
59044       has_space=`$ECHO "$path" | $GREP " "`
59045       if test "x$has_space" != x; then
59046         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59047 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59048         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59049       fi
59050 
59051       # Use eval to expand a potential ~
59052       eval path="$path"
59053       if test ! -f "$path" && test ! -d "$path"; then
59054         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59055       fi
59056 
59057       if test -d "$path"; then
59058         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59059       else
59060         dir="`$DIRNAME "$path"`"
59061         base="`$BASENAME "$path"`"
59062         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59063       fi
59064     fi
59065   fi
59066 
59067 
59068     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59070 $as_echo_n "checking for freetype includes... " >&6; }
59071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59072 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59073     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59074     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59075 $as_echo_n "checking for freetype libraries... " >&6; }
59076     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59077 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59078   fi
59079 
59080         if test "x$FOUND_FREETYPE" != xyes; then
59081           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
59082         fi
59083       else
59084         # User specified only one of lib or include. This is an error.
59085         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
59086           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
59087 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
59088           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59089         else
59090           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
59091 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
59092           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59093         fi
59094       fi
59095     else
59096       # User did not specify settings, but we need freetype. Try to locate it.
59097 
59098       if test "x$BUNDLE_FREETYPE" = x; then
59099         # If not specified, default is to bundle freetype only on windows
59100         if test "x$OPENJDK_TARGET_OS" = xwindows; then
59101           BUNDLE_FREETYPE=yes
59102         else
59103           BUNDLE_FREETYPE=no
59104         fi
59105       fi
59106 
59107       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
59108       if test "x$SYSROOT" = x; then
59109         if test "x$FOUND_FREETYPE" != xyes; then
59110           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
59111           if test "x$PKG_CONFIG" != x; then
59112 
59113 pkg_failed=no
59114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
59115 $as_echo_n "checking for FREETYPE... " >&6; }
59116 
59117 if test -n "$FREETYPE_CFLAGS"; then
59118     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
59119  elif test -n "$PKG_CONFIG"; then
59120     if test -n "$PKG_CONFIG" && \
59121     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59122   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59123   ac_status=$?
59124   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59125   test $ac_status = 0; }; then
59126   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
59127 else
59128   pkg_failed=yes
59129 fi
59130  else
59131     pkg_failed=untried
59132 fi
59133 if test -n "$FREETYPE_LIBS"; then
59134     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
59135  elif test -n "$PKG_CONFIG"; then
59136     if test -n "$PKG_CONFIG" && \
59137     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59138   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59139   ac_status=$?
59140   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59141   test $ac_status = 0; }; then
59142   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
59143 else
59144   pkg_failed=yes
59145 fi
59146  else
59147     pkg_failed=untried
59148 fi
59149 
59150 
59151 
59152 if test $pkg_failed = yes; then
59153 
59154 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59155         _pkg_short_errors_supported=yes
59156 else
59157         _pkg_short_errors_supported=no
59158 fi
59159         if test $_pkg_short_errors_supported = yes; then
59160                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
59161         else
59162                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
59163         fi
59164         # Put the nasty error message in config.log where it belongs
59165         echo "$FREETYPE_PKG_ERRORS" >&5
59166 
59167         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59168 $as_echo "no" >&6; }
59169                 FOUND_FREETYPE=no
59170 elif test $pkg_failed = untried; then
59171         FOUND_FREETYPE=no
59172 else
59173         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
59174         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
59175         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59176 $as_echo "yes" >&6; }
59177         FOUND_FREETYPE=yes
59178 fi
59179             if test "x$FOUND_FREETYPE" = xyes; then
59180               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
59181               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
59182               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
59183               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
59184                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
59185               fi
59186               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
59187               if test "x$BUNDLE_FREETYPE" = xyes; then
59188                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
59189 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
59190                 FOUND_FREETYPE=no
59191               else
59192                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
59193 $as_echo_n "checking for freetype... " >&6; }
59194                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
59195 $as_echo "yes (using pkg-config)" >&6; }
59196               fi
59197             fi
59198           fi
59199         fi
59200       fi
59201 
59202       if test "x$FOUND_FREETYPE" != xyes; then
59203         # Check in well-known locations
59204         if test "x$OPENJDK_TARGET_OS" = xwindows; then
59205           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
59206 
59207   windows_path="$FREETYPE_BASE_DIR"
59208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59209     unix_path=`$CYGPATH -u "$windows_path"`
59210     FREETYPE_BASE_DIR="$unix_path"
59211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59213     FREETYPE_BASE_DIR="$unix_path"
59214   fi
59215 
59216 
59217   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59218   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59219   METHOD="well-known location"
59220 
59221   # Let's start with an optimistic view of the world :-)
59222   FOUND_FREETYPE=yes
59223 
59224   # First look for the canonical freetype main include file ft2build.h.
59225   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59226     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59227     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59228     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59229       # Fail.
59230       FOUND_FREETYPE=no
59231     fi
59232   fi
59233 
59234   if test "x$FOUND_FREETYPE" = xyes; then
59235     # Include file found, let's continue the sanity check.
59236     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59237 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59238 
59239     # Reset to default value
59240     FREETYPE_BASE_NAME=freetype
59241     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59242     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59243       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59244           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59245         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59246         # for the .6 version explicitly.
59247         FREETYPE_BASE_NAME=freetype.6
59248         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59249         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59250 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59251       else
59252         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59253 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59254         FOUND_FREETYPE=no
59255       fi
59256     else
59257       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59258         # On Windows, we will need both .lib and .dll file.
59259         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59260           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59261 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59262           FOUND_FREETYPE=no
59263         fi
59264       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59265           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59266         # Found lib in isa dir, use that instead.
59267         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59268         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59269 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59270       fi
59271     fi
59272   fi
59273 
59274   if test "x$FOUND_FREETYPE" = xyes; then
59275 
59276   # Only process if variable expands to non-empty
59277 
59278   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59279     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59280 
59281   # Input might be given as Windows format, start by converting to
59282   # unix format.
59283   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59284   new_path=`$CYGPATH -u "$path"`
59285 
59286   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59287   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59288   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59289   # "foo.exe" is OK but "foo" is an error.
59290   #
59291   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59292   # It is also a way to make sure we got the proper file name for the real test later on.
59293   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59294   if test "x$test_shortpath" = x; then
59295     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59296 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59297     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59298   fi
59299 
59300   # Call helper function which possibly converts this using DOS-style short mode.
59301   # If so, the updated path is stored in $new_path.
59302 
59303   input_path="$new_path"
59304   # Check if we need to convert this using DOS-style short mode. If the path
59305   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59306   # take no chances and rewrite it.
59307   # Note: m4 eats our [], so we need to use [ and ] instead.
59308   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59309   if test "x$has_forbidden_chars" != x; then
59310     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59311     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59312     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59313     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59314       # Going to short mode and back again did indeed matter. Since short mode is
59315       # case insensitive, let's make it lowercase to improve readability.
59316       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59317       # Now convert it back to Unix-style (cygpath)
59318       input_path=`$CYGPATH -u "$shortmode_path"`
59319       new_path="$input_path"
59320     fi
59321   fi
59322 
59323   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59324   if test "x$test_cygdrive_prefix" = x; then
59325     # As a simple fix, exclude /usr/bin since it's not a real path.
59326     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59327       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59328       # a path prefixed by /cygdrive for fixpath to work.
59329       new_path="$CYGWIN_ROOT_PATH$input_path"
59330     fi
59331   fi
59332 
59333 
59334   if test "x$path" != "x$new_path"; then
59335     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59336     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59337 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59338   fi
59339 
59340     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59341 
59342   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59343   has_colon=`$ECHO $path | $GREP ^.:`
59344   new_path="$path"
59345   if test "x$has_colon" = x; then
59346     # Not in mixed or Windows style, start by that.
59347     new_path=`cmd //c echo $path`
59348   fi
59349 
59350 
59351   input_path="$new_path"
59352   # Check if we need to convert this using DOS-style short mode. If the path
59353   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59354   # take no chances and rewrite it.
59355   # Note: m4 eats our [], so we need to use [ and ] instead.
59356   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59357   if test "x$has_forbidden_chars" != x; then
59358     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59359     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59360   fi
59361 
59362 
59363   windows_path="$new_path"
59364   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59365     unix_path=`$CYGPATH -u "$windows_path"`
59366     new_path="$unix_path"
59367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59368     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59369     new_path="$unix_path"
59370   fi
59371 
59372   if test "x$path" != "x$new_path"; then
59373     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59374     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59375 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59376   fi
59377 
59378   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59379   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59380 
59381     else
59382       # We're on a unix platform. Hooray! :)
59383       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59384       has_space=`$ECHO "$path" | $GREP " "`
59385       if test "x$has_space" != x; then
59386         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59387 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59388         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59389       fi
59390 
59391       # Use eval to expand a potential ~
59392       eval path="$path"
59393       if test ! -f "$path" && test ! -d "$path"; then
59394         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59395       fi
59396 
59397       if test -d "$path"; then
59398         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59399       else
59400         dir="`$DIRNAME "$path"`"
59401         base="`$BASENAME "$path"`"
59402         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59403       fi
59404     fi
59405   fi
59406 
59407 
59408   # Only process if variable expands to non-empty
59409 
59410   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59411     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59412 
59413   # Input might be given as Windows format, start by converting to
59414   # unix format.
59415   path="$POTENTIAL_FREETYPE_LIB_PATH"
59416   new_path=`$CYGPATH -u "$path"`
59417 
59418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59421   # "foo.exe" is OK but "foo" is an error.
59422   #
59423   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59424   # It is also a way to make sure we got the proper file name for the real test later on.
59425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59426   if test "x$test_shortpath" = x; then
59427     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59428 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59429     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59430   fi
59431 
59432   # Call helper function which possibly converts this using DOS-style short mode.
59433   # If so, the updated path is stored in $new_path.
59434 
59435   input_path="$new_path"
59436   # Check if we need to convert this using DOS-style short mode. If the path
59437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59438   # take no chances and rewrite it.
59439   # Note: m4 eats our [], so we need to use [ and ] instead.
59440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59441   if test "x$has_forbidden_chars" != x; then
59442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59443     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59444     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59445     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59446       # Going to short mode and back again did indeed matter. Since short mode is
59447       # case insensitive, let's make it lowercase to improve readability.
59448       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59449       # Now convert it back to Unix-style (cygpath)
59450       input_path=`$CYGPATH -u "$shortmode_path"`
59451       new_path="$input_path"
59452     fi
59453   fi
59454 
59455   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59456   if test "x$test_cygdrive_prefix" = x; then
59457     # As a simple fix, exclude /usr/bin since it's not a real path.
59458     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59459       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59460       # a path prefixed by /cygdrive for fixpath to work.
59461       new_path="$CYGWIN_ROOT_PATH$input_path"
59462     fi
59463   fi
59464 
59465 
59466   if test "x$path" != "x$new_path"; then
59467     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59468     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59469 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59470   fi
59471 
59472     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59473 
59474   path="$POTENTIAL_FREETYPE_LIB_PATH"
59475   has_colon=`$ECHO $path | $GREP ^.:`
59476   new_path="$path"
59477   if test "x$has_colon" = x; then
59478     # Not in mixed or Windows style, start by that.
59479     new_path=`cmd //c echo $path`
59480   fi
59481 
59482 
59483   input_path="$new_path"
59484   # Check if we need to convert this using DOS-style short mode. If the path
59485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59486   # take no chances and rewrite it.
59487   # Note: m4 eats our [], so we need to use [ and ] instead.
59488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59489   if test "x$has_forbidden_chars" != x; then
59490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59491     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59492   fi
59493 
59494 
59495   windows_path="$new_path"
59496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59497     unix_path=`$CYGPATH -u "$windows_path"`
59498     new_path="$unix_path"
59499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59501     new_path="$unix_path"
59502   fi
59503 
59504   if test "x$path" != "x$new_path"; then
59505     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59506     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59507 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59508   fi
59509 
59510   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59511   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59512 
59513     else
59514       # We're on a unix platform. Hooray! :)
59515       path="$POTENTIAL_FREETYPE_LIB_PATH"
59516       has_space=`$ECHO "$path" | $GREP " "`
59517       if test "x$has_space" != x; then
59518         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59519 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59520         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59521       fi
59522 
59523       # Use eval to expand a potential ~
59524       eval path="$path"
59525       if test ! -f "$path" && test ! -d "$path"; then
59526         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59527       fi
59528 
59529       if test -d "$path"; then
59530         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59531       else
59532         dir="`$DIRNAME "$path"`"
59533         base="`$BASENAME "$path"`"
59534         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59535       fi
59536     fi
59537   fi
59538 
59539 
59540     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59541     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59542 $as_echo_n "checking for freetype includes... " >&6; }
59543     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59544 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59545     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59546     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59547 $as_echo_n "checking for freetype libraries... " >&6; }
59548     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59549 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59550   fi
59551 
59552           if test "x$FOUND_FREETYPE" != xyes; then
59553             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59554 
59555   windows_path="$FREETYPE_BASE_DIR"
59556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59557     unix_path=`$CYGPATH -u "$windows_path"`
59558     FREETYPE_BASE_DIR="$unix_path"
59559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59561     FREETYPE_BASE_DIR="$unix_path"
59562   fi
59563 
59564 
59565   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59566   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59567   METHOD="well-known location"
59568 
59569   # Let's start with an optimistic view of the world :-)
59570   FOUND_FREETYPE=yes
59571 
59572   # First look for the canonical freetype main include file ft2build.h.
59573   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59574     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59575     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59576     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59577       # Fail.
59578       FOUND_FREETYPE=no
59579     fi
59580   fi
59581 
59582   if test "x$FOUND_FREETYPE" = xyes; then
59583     # Include file found, let's continue the sanity check.
59584     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59585 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59586 
59587     # Reset to default value
59588     FREETYPE_BASE_NAME=freetype
59589     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59590     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59591       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59592           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59593         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59594         # for the .6 version explicitly.
59595         FREETYPE_BASE_NAME=freetype.6
59596         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59597         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59598 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59599       else
59600         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59601 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59602         FOUND_FREETYPE=no
59603       fi
59604     else
59605       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59606         # On Windows, we will need both .lib and .dll file.
59607         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59608           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59609 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59610           FOUND_FREETYPE=no
59611         fi
59612       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59613           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59614         # Found lib in isa dir, use that instead.
59615         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59616         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59617 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59618       fi
59619     fi
59620   fi
59621 
59622   if test "x$FOUND_FREETYPE" = xyes; then
59623 
59624   # Only process if variable expands to non-empty
59625 
59626   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59627     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59628 
59629   # Input might be given as Windows format, start by converting to
59630   # unix format.
59631   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59632   new_path=`$CYGPATH -u "$path"`
59633 
59634   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59635   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59636   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59637   # "foo.exe" is OK but "foo" is an error.
59638   #
59639   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59640   # It is also a way to make sure we got the proper file name for the real test later on.
59641   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59642   if test "x$test_shortpath" = x; then
59643     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59644 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59645     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59646   fi
59647 
59648   # Call helper function which possibly converts this using DOS-style short mode.
59649   # If so, the updated path is stored in $new_path.
59650 
59651   input_path="$new_path"
59652   # Check if we need to convert this using DOS-style short mode. If the path
59653   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59654   # take no chances and rewrite it.
59655   # Note: m4 eats our [], so we need to use [ and ] instead.
59656   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59657   if test "x$has_forbidden_chars" != x; then
59658     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59659     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59660     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59661     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59662       # Going to short mode and back again did indeed matter. Since short mode is
59663       # case insensitive, let's make it lowercase to improve readability.
59664       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59665       # Now convert it back to Unix-style (cygpath)
59666       input_path=`$CYGPATH -u "$shortmode_path"`
59667       new_path="$input_path"
59668     fi
59669   fi
59670 
59671   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59672   if test "x$test_cygdrive_prefix" = x; then
59673     # As a simple fix, exclude /usr/bin since it's not a real path.
59674     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59675       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59676       # a path prefixed by /cygdrive for fixpath to work.
59677       new_path="$CYGWIN_ROOT_PATH$input_path"
59678     fi
59679   fi
59680 
59681 
59682   if test "x$path" != "x$new_path"; then
59683     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59684     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59685 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59686   fi
59687 
59688     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59689 
59690   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59691   has_colon=`$ECHO $path | $GREP ^.:`
59692   new_path="$path"
59693   if test "x$has_colon" = x; then
59694     # Not in mixed or Windows style, start by that.
59695     new_path=`cmd //c echo $path`
59696   fi
59697 
59698 
59699   input_path="$new_path"
59700   # Check if we need to convert this using DOS-style short mode. If the path
59701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59702   # take no chances and rewrite it.
59703   # Note: m4 eats our [], so we need to use [ and ] instead.
59704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59705   if test "x$has_forbidden_chars" != x; then
59706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59707     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59708   fi
59709 
59710 
59711   windows_path="$new_path"
59712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59713     unix_path=`$CYGPATH -u "$windows_path"`
59714     new_path="$unix_path"
59715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59717     new_path="$unix_path"
59718   fi
59719 
59720   if test "x$path" != "x$new_path"; then
59721     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59722     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59723 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59724   fi
59725 
59726   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59727   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59728 
59729     else
59730       # We're on a unix platform. Hooray! :)
59731       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59732       has_space=`$ECHO "$path" | $GREP " "`
59733       if test "x$has_space" != x; then
59734         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59735 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59736         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59737       fi
59738 
59739       # Use eval to expand a potential ~
59740       eval path="$path"
59741       if test ! -f "$path" && test ! -d "$path"; then
59742         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59743       fi
59744 
59745       if test -d "$path"; then
59746         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59747       else
59748         dir="`$DIRNAME "$path"`"
59749         base="`$BASENAME "$path"`"
59750         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59751       fi
59752     fi
59753   fi
59754 
59755 
59756   # Only process if variable expands to non-empty
59757 
59758   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59759     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59760 
59761   # Input might be given as Windows format, start by converting to
59762   # unix format.
59763   path="$POTENTIAL_FREETYPE_LIB_PATH"
59764   new_path=`$CYGPATH -u "$path"`
59765 
59766   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59767   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59768   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59769   # "foo.exe" is OK but "foo" is an error.
59770   #
59771   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59772   # It is also a way to make sure we got the proper file name for the real test later on.
59773   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59774   if test "x$test_shortpath" = x; then
59775     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59776 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59777     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59778   fi
59779 
59780   # Call helper function which possibly converts this using DOS-style short mode.
59781   # If so, the updated path is stored in $new_path.
59782 
59783   input_path="$new_path"
59784   # Check if we need to convert this using DOS-style short mode. If the path
59785   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59786   # take no chances and rewrite it.
59787   # Note: m4 eats our [], so we need to use [ and ] instead.
59788   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59789   if test "x$has_forbidden_chars" != x; then
59790     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59791     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59792     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59793     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59794       # Going to short mode and back again did indeed matter. Since short mode is
59795       # case insensitive, let's make it lowercase to improve readability.
59796       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59797       # Now convert it back to Unix-style (cygpath)
59798       input_path=`$CYGPATH -u "$shortmode_path"`
59799       new_path="$input_path"
59800     fi
59801   fi
59802 
59803   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59804   if test "x$test_cygdrive_prefix" = x; then
59805     # As a simple fix, exclude /usr/bin since it's not a real path.
59806     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59807       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59808       # a path prefixed by /cygdrive for fixpath to work.
59809       new_path="$CYGWIN_ROOT_PATH$input_path"
59810     fi
59811   fi
59812 
59813 
59814   if test "x$path" != "x$new_path"; then
59815     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59816     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59817 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59818   fi
59819 
59820     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59821 
59822   path="$POTENTIAL_FREETYPE_LIB_PATH"
59823   has_colon=`$ECHO $path | $GREP ^.:`
59824   new_path="$path"
59825   if test "x$has_colon" = x; then
59826     # Not in mixed or Windows style, start by that.
59827     new_path=`cmd //c echo $path`
59828   fi
59829 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59840   fi
59841 
59842 
59843   windows_path="$new_path"
59844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59845     unix_path=`$CYGPATH -u "$windows_path"`
59846     new_path="$unix_path"
59847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59848     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59849     new_path="$unix_path"
59850   fi
59851 
59852   if test "x$path" != "x$new_path"; then
59853     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59854     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59855 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59856   fi
59857 
59858   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59859   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59860 
59861     else
59862       # We're on a unix platform. Hooray! :)
59863       path="$POTENTIAL_FREETYPE_LIB_PATH"
59864       has_space=`$ECHO "$path" | $GREP " "`
59865       if test "x$has_space" != x; then
59866         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59867 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59868         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59869       fi
59870 
59871       # Use eval to expand a potential ~
59872       eval path="$path"
59873       if test ! -f "$path" && test ! -d "$path"; then
59874         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59875       fi
59876 
59877       if test -d "$path"; then
59878         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59879       else
59880         dir="`$DIRNAME "$path"`"
59881         base="`$BASENAME "$path"`"
59882         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59883       fi
59884     fi
59885   fi
59886 
59887 
59888     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59889     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59890 $as_echo_n "checking for freetype includes... " >&6; }
59891     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59892 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59893     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59894     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59895 $as_echo_n "checking for freetype libraries... " >&6; }
59896     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59897 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59898   fi
59899 
59900           fi
59901           if test "x$FOUND_FREETYPE" != xyes; then
59902             FREETYPE_BASE_DIR="$HOME/freetype"
59903 
59904   windows_path="$FREETYPE_BASE_DIR"
59905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59906     unix_path=`$CYGPATH -u "$windows_path"`
59907     FREETYPE_BASE_DIR="$unix_path"
59908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59909     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59910     FREETYPE_BASE_DIR="$unix_path"
59911   fi
59912 
59913             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59914 
59915   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59916   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59917   METHOD="well-known location"
59918 
59919   # Let's start with an optimistic view of the world :-)
59920   FOUND_FREETYPE=yes
59921 
59922   # First look for the canonical freetype main include file ft2build.h.
59923   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59924     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59925     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59926     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59927       # Fail.
59928       FOUND_FREETYPE=no
59929     fi
59930   fi
59931 
59932   if test "x$FOUND_FREETYPE" = xyes; then
59933     # Include file found, let's continue the sanity check.
59934     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59935 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59936 
59937     # Reset to default value
59938     FREETYPE_BASE_NAME=freetype
59939     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59940     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59941       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59942           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59943         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59944         # for the .6 version explicitly.
59945         FREETYPE_BASE_NAME=freetype.6
59946         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59947         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59948 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59949       else
59950         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59951 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59952         FOUND_FREETYPE=no
59953       fi
59954     else
59955       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59956         # On Windows, we will need both .lib and .dll file.
59957         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59958           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59959 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59960           FOUND_FREETYPE=no
59961         fi
59962       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59963           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59964         # Found lib in isa dir, use that instead.
59965         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59966         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59967 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59968       fi
59969     fi
59970   fi
59971 
59972   if test "x$FOUND_FREETYPE" = xyes; then
59973 
59974   # Only process if variable expands to non-empty
59975 
59976   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59977     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59978 
59979   # Input might be given as Windows format, start by converting to
59980   # unix format.
59981   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59982   new_path=`$CYGPATH -u "$path"`
59983 
59984   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59985   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59986   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59987   # "foo.exe" is OK but "foo" is an error.
59988   #
59989   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59990   # It is also a way to make sure we got the proper file name for the real test later on.
59991   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59992   if test "x$test_shortpath" = x; then
59993     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59994 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59995     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59996   fi
59997 
59998   # Call helper function which possibly converts this using DOS-style short mode.
59999   # If so, the updated path is stored in $new_path.
60000 
60001   input_path="$new_path"
60002   # Check if we need to convert this using DOS-style short mode. If the path
60003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60004   # take no chances and rewrite it.
60005   # Note: m4 eats our [], so we need to use [ and ] instead.
60006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60007   if test "x$has_forbidden_chars" != x; then
60008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60009     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60010     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60011     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60012       # Going to short mode and back again did indeed matter. Since short mode is
60013       # case insensitive, let's make it lowercase to improve readability.
60014       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60015       # Now convert it back to Unix-style (cygpath)
60016       input_path=`$CYGPATH -u "$shortmode_path"`
60017       new_path="$input_path"
60018     fi
60019   fi
60020 
60021   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60022   if test "x$test_cygdrive_prefix" = x; then
60023     # As a simple fix, exclude /usr/bin since it's not a real path.
60024     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60025       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60026       # a path prefixed by /cygdrive for fixpath to work.
60027       new_path="$CYGWIN_ROOT_PATH$input_path"
60028     fi
60029   fi
60030 
60031 
60032   if test "x$path" != "x$new_path"; then
60033     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60034     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60035 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60036   fi
60037 
60038     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60039 
60040   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60041   has_colon=`$ECHO $path | $GREP ^.:`
60042   new_path="$path"
60043   if test "x$has_colon" = x; then
60044     # Not in mixed or Windows style, start by that.
60045     new_path=`cmd //c echo $path`
60046   fi
60047 
60048 
60049   input_path="$new_path"
60050   # Check if we need to convert this using DOS-style short mode. If the path
60051   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60052   # take no chances and rewrite it.
60053   # Note: m4 eats our [], so we need to use [ and ] instead.
60054   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60055   if test "x$has_forbidden_chars" != x; then
60056     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60057     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60058   fi
60059 
60060 
60061   windows_path="$new_path"
60062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60063     unix_path=`$CYGPATH -u "$windows_path"`
60064     new_path="$unix_path"
60065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60067     new_path="$unix_path"
60068   fi
60069 
60070   if test "x$path" != "x$new_path"; then
60071     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60072     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60073 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60074   fi
60075 
60076   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60077   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60078 
60079     else
60080       # We're on a unix platform. Hooray! :)
60081       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60082       has_space=`$ECHO "$path" | $GREP " "`
60083       if test "x$has_space" != x; then
60084         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60085 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60086         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60087       fi
60088 
60089       # Use eval to expand a potential ~
60090       eval path="$path"
60091       if test ! -f "$path" && test ! -d "$path"; then
60092         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60093       fi
60094 
60095       if test -d "$path"; then
60096         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60097       else
60098         dir="`$DIRNAME "$path"`"
60099         base="`$BASENAME "$path"`"
60100         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60101       fi
60102     fi
60103   fi
60104 
60105 
60106   # Only process if variable expands to non-empty
60107 
60108   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60109     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60110 
60111   # Input might be given as Windows format, start by converting to
60112   # unix format.
60113   path="$POTENTIAL_FREETYPE_LIB_PATH"
60114   new_path=`$CYGPATH -u "$path"`
60115 
60116   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60117   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60118   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60119   # "foo.exe" is OK but "foo" is an error.
60120   #
60121   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60122   # It is also a way to make sure we got the proper file name for the real test later on.
60123   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60124   if test "x$test_shortpath" = x; then
60125     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60126 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60127     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60128   fi
60129 
60130   # Call helper function which possibly converts this using DOS-style short mode.
60131   # If so, the updated path is stored in $new_path.
60132 
60133   input_path="$new_path"
60134   # Check if we need to convert this using DOS-style short mode. If the path
60135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60136   # take no chances and rewrite it.
60137   # Note: m4 eats our [], so we need to use [ and ] instead.
60138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60139   if test "x$has_forbidden_chars" != x; then
60140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60141     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60142     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60143     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60144       # Going to short mode and back again did indeed matter. Since short mode is
60145       # case insensitive, let's make it lowercase to improve readability.
60146       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60147       # Now convert it back to Unix-style (cygpath)
60148       input_path=`$CYGPATH -u "$shortmode_path"`
60149       new_path="$input_path"
60150     fi
60151   fi
60152 
60153   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60154   if test "x$test_cygdrive_prefix" = x; then
60155     # As a simple fix, exclude /usr/bin since it's not a real path.
60156     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60157       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60158       # a path prefixed by /cygdrive for fixpath to work.
60159       new_path="$CYGWIN_ROOT_PATH$input_path"
60160     fi
60161   fi
60162 
60163 
60164   if test "x$path" != "x$new_path"; then
60165     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60167 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60168   fi
60169 
60170     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60171 
60172   path="$POTENTIAL_FREETYPE_LIB_PATH"
60173   has_colon=`$ECHO $path | $GREP ^.:`
60174   new_path="$path"
60175   if test "x$has_colon" = x; then
60176     # Not in mixed or Windows style, start by that.
60177     new_path=`cmd //c echo $path`
60178   fi
60179 
60180 
60181   input_path="$new_path"
60182   # Check if we need to convert this using DOS-style short mode. If the path
60183   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60184   # take no chances and rewrite it.
60185   # Note: m4 eats our [], so we need to use [ and ] instead.
60186   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60187   if test "x$has_forbidden_chars" != x; then
60188     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60189     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60190   fi
60191 
60192 
60193   windows_path="$new_path"
60194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60195     unix_path=`$CYGPATH -u "$windows_path"`
60196     new_path="$unix_path"
60197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60199     new_path="$unix_path"
60200   fi
60201 
60202   if test "x$path" != "x$new_path"; then
60203     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60205 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60206   fi
60207 
60208   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60209   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60210 
60211     else
60212       # We're on a unix platform. Hooray! :)
60213       path="$POTENTIAL_FREETYPE_LIB_PATH"
60214       has_space=`$ECHO "$path" | $GREP " "`
60215       if test "x$has_space" != x; then
60216         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60217 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60218         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60219       fi
60220 
60221       # Use eval to expand a potential ~
60222       eval path="$path"
60223       if test ! -f "$path" && test ! -d "$path"; then
60224         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60225       fi
60226 
60227       if test -d "$path"; then
60228         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60229       else
60230         dir="`$DIRNAME "$path"`"
60231         base="`$BASENAME "$path"`"
60232         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60233       fi
60234     fi
60235   fi
60236 
60237 
60238     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60239     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60240 $as_echo_n "checking for freetype includes... " >&6; }
60241     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60242 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60243     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60245 $as_echo_n "checking for freetype libraries... " >&6; }
60246     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60247 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60248   fi
60249 
60250             else
60251 
60252   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60253   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60254   METHOD="well-known location"
60255 
60256   # Let's start with an optimistic view of the world :-)
60257   FOUND_FREETYPE=yes
60258 
60259   # First look for the canonical freetype main include file ft2build.h.
60260   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60261     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60262     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60263     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60264       # Fail.
60265       FOUND_FREETYPE=no
60266     fi
60267   fi
60268 
60269   if test "x$FOUND_FREETYPE" = xyes; then
60270     # Include file found, let's continue the sanity check.
60271     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60272 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60273 
60274     # Reset to default value
60275     FREETYPE_BASE_NAME=freetype
60276     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60277     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60278       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60279           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60280         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60281         # for the .6 version explicitly.
60282         FREETYPE_BASE_NAME=freetype.6
60283         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60284         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60285 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60286       else
60287         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60288 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60289         FOUND_FREETYPE=no
60290       fi
60291     else
60292       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60293         # On Windows, we will need both .lib and .dll file.
60294         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60295           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60296 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60297           FOUND_FREETYPE=no
60298         fi
60299       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60300           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60301         # Found lib in isa dir, use that instead.
60302         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60303         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60304 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60305       fi
60306     fi
60307   fi
60308 
60309   if test "x$FOUND_FREETYPE" = xyes; then
60310 
60311   # Only process if variable expands to non-empty
60312 
60313   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60314     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60315 
60316   # Input might be given as Windows format, start by converting to
60317   # unix format.
60318   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60319   new_path=`$CYGPATH -u "$path"`
60320 
60321   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60322   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60323   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60324   # "foo.exe" is OK but "foo" is an error.
60325   #
60326   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60327   # It is also a way to make sure we got the proper file name for the real test later on.
60328   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60329   if test "x$test_shortpath" = x; then
60330     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60331 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60332     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60333   fi
60334 
60335   # Call helper function which possibly converts this using DOS-style short mode.
60336   # If so, the updated path is stored in $new_path.
60337 
60338   input_path="$new_path"
60339   # Check if we need to convert this using DOS-style short mode. If the path
60340   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60341   # take no chances and rewrite it.
60342   # Note: m4 eats our [], so we need to use [ and ] instead.
60343   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60344   if test "x$has_forbidden_chars" != x; then
60345     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60346     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60347     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60348     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60349       # Going to short mode and back again did indeed matter. Since short mode is
60350       # case insensitive, let's make it lowercase to improve readability.
60351       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60352       # Now convert it back to Unix-style (cygpath)
60353       input_path=`$CYGPATH -u "$shortmode_path"`
60354       new_path="$input_path"
60355     fi
60356   fi
60357 
60358   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60359   if test "x$test_cygdrive_prefix" = x; then
60360     # As a simple fix, exclude /usr/bin since it's not a real path.
60361     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60362       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60363       # a path prefixed by /cygdrive for fixpath to work.
60364       new_path="$CYGWIN_ROOT_PATH$input_path"
60365     fi
60366   fi
60367 
60368 
60369   if test "x$path" != "x$new_path"; then
60370     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60371     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60372 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60373   fi
60374 
60375     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60376 
60377   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60378   has_colon=`$ECHO $path | $GREP ^.:`
60379   new_path="$path"
60380   if test "x$has_colon" = x; then
60381     # Not in mixed or Windows style, start by that.
60382     new_path=`cmd //c echo $path`
60383   fi
60384 
60385 
60386   input_path="$new_path"
60387   # Check if we need to convert this using DOS-style short mode. If the path
60388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60389   # take no chances and rewrite it.
60390   # Note: m4 eats our [], so we need to use [ and ] instead.
60391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60392   if test "x$has_forbidden_chars" != x; then
60393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60394     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60395   fi
60396 
60397 
60398   windows_path="$new_path"
60399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60400     unix_path=`$CYGPATH -u "$windows_path"`
60401     new_path="$unix_path"
60402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60404     new_path="$unix_path"
60405   fi
60406 
60407   if test "x$path" != "x$new_path"; then
60408     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60410 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60411   fi
60412 
60413   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60414   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60415 
60416     else
60417       # We're on a unix platform. Hooray! :)
60418       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60419       has_space=`$ECHO "$path" | $GREP " "`
60420       if test "x$has_space" != x; then
60421         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60422 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60423         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60424       fi
60425 
60426       # Use eval to expand a potential ~
60427       eval path="$path"
60428       if test ! -f "$path" && test ! -d "$path"; then
60429         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60430       fi
60431 
60432       if test -d "$path"; then
60433         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60434       else
60435         dir="`$DIRNAME "$path"`"
60436         base="`$BASENAME "$path"`"
60437         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60438       fi
60439     fi
60440   fi
60441 
60442 
60443   # Only process if variable expands to non-empty
60444 
60445   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60446     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60447 
60448   # Input might be given as Windows format, start by converting to
60449   # unix format.
60450   path="$POTENTIAL_FREETYPE_LIB_PATH"
60451   new_path=`$CYGPATH -u "$path"`
60452 
60453   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60454   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60455   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60456   # "foo.exe" is OK but "foo" is an error.
60457   #
60458   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60459   # It is also a way to make sure we got the proper file name for the real test later on.
60460   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60461   if test "x$test_shortpath" = x; then
60462     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60463 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60464     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60465   fi
60466 
60467   # Call helper function which possibly converts this using DOS-style short mode.
60468   # If so, the updated path is stored in $new_path.
60469 
60470   input_path="$new_path"
60471   # Check if we need to convert this using DOS-style short mode. If the path
60472   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60473   # take no chances and rewrite it.
60474   # Note: m4 eats our [], so we need to use [ and ] instead.
60475   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60476   if test "x$has_forbidden_chars" != x; then
60477     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60478     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60479     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60480     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60481       # Going to short mode and back again did indeed matter. Since short mode is
60482       # case insensitive, let's make it lowercase to improve readability.
60483       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60484       # Now convert it back to Unix-style (cygpath)
60485       input_path=`$CYGPATH -u "$shortmode_path"`
60486       new_path="$input_path"
60487     fi
60488   fi
60489 
60490   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60491   if test "x$test_cygdrive_prefix" = x; then
60492     # As a simple fix, exclude /usr/bin since it's not a real path.
60493     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60494       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60495       # a path prefixed by /cygdrive for fixpath to work.
60496       new_path="$CYGWIN_ROOT_PATH$input_path"
60497     fi
60498   fi
60499 
60500 
60501   if test "x$path" != "x$new_path"; then
60502     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60503     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60504 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60505   fi
60506 
60507     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60508 
60509   path="$POTENTIAL_FREETYPE_LIB_PATH"
60510   has_colon=`$ECHO $path | $GREP ^.:`
60511   new_path="$path"
60512   if test "x$has_colon" = x; then
60513     # Not in mixed or Windows style, start by that.
60514     new_path=`cmd //c echo $path`
60515   fi
60516 
60517 
60518   input_path="$new_path"
60519   # Check if we need to convert this using DOS-style short mode. If the path
60520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60521   # take no chances and rewrite it.
60522   # Note: m4 eats our [], so we need to use [ and ] instead.
60523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60524   if test "x$has_forbidden_chars" != x; then
60525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60526     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60527   fi
60528 
60529 
60530   windows_path="$new_path"
60531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60532     unix_path=`$CYGPATH -u "$windows_path"`
60533     new_path="$unix_path"
60534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60536     new_path="$unix_path"
60537   fi
60538 
60539   if test "x$path" != "x$new_path"; then
60540     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60541     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60542 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60543   fi
60544 
60545   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60546   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60547 
60548     else
60549       # We're on a unix platform. Hooray! :)
60550       path="$POTENTIAL_FREETYPE_LIB_PATH"
60551       has_space=`$ECHO "$path" | $GREP " "`
60552       if test "x$has_space" != x; then
60553         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60554 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60555         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60556       fi
60557 
60558       # Use eval to expand a potential ~
60559       eval path="$path"
60560       if test ! -f "$path" && test ! -d "$path"; then
60561         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60562       fi
60563 
60564       if test -d "$path"; then
60565         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60566       else
60567         dir="`$DIRNAME "$path"`"
60568         base="`$BASENAME "$path"`"
60569         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60570       fi
60571     fi
60572   fi
60573 
60574 
60575     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60576     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60577 $as_echo_n "checking for freetype includes... " >&6; }
60578     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60579 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60580     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60581     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60582 $as_echo_n "checking for freetype libraries... " >&6; }
60583     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60584 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60585   fi
60586 
60587             fi
60588             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60589                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60590               # Source is available, as a last resort try to build freetype in default location
60591 
60592   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60593   BUILD_FREETYPE=yes
60594 
60595   # Check if the freetype sources are acessible..
60596   if ! test -d $FREETYPE_SRC_PATH; then
60597     { $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
60598 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60599     BUILD_FREETYPE=no
60600   fi
60601   # ..and contain a vc2010 project file
60602   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60603   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60604     { $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
60605 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60606     BUILD_FREETYPE=no
60607   fi
60608   # Now check if configure found a version of 'msbuild.exe'
60609   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60610     { $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
60611 $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;}
60612     BUILD_FREETYPE=no
60613   fi
60614 
60615   # Ready to go..
60616   if test "x$BUILD_FREETYPE" = xyes; then
60617     # msbuild requires trailing slashes for output directories
60618     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60619     freetype_lib_path_unix="$freetype_lib_path"
60620     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60621 
60622   unix_path="$vcxproj_path"
60623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60624     windows_path=`$CYGPATH -m "$unix_path"`
60625     vcxproj_path="$windows_path"
60626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60627     windows_path=`cmd //c echo $unix_path`
60628     vcxproj_path="$windows_path"
60629   fi
60630 
60631 
60632   unix_path="$freetype_lib_path"
60633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60634     windows_path=`$CYGPATH -m "$unix_path"`
60635     freetype_lib_path="$windows_path"
60636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60637     windows_path=`cmd //c echo $unix_path`
60638     freetype_lib_path="$windows_path"
60639   fi
60640 
60641 
60642   unix_path="$freetype_obj_path"
60643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60644     windows_path=`$CYGPATH -m "$unix_path"`
60645     freetype_obj_path="$windows_path"
60646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60647     windows_path=`cmd //c echo $unix_path`
60648     freetype_obj_path="$windows_path"
60649   fi
60650 
60651     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60652       freetype_platform=x64
60653     else
60654       freetype_platform=win32
60655     fi
60656 
60657     # The original freetype project file is for VS 2010 (i.e. 'v100'),
60658     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60659     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60660     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60661     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60662 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60663 
60664     # First we try to build the freetype.dll
60665     $ECHO -e "@echo off\n"\
60666         "$MSBUILD $vcxproj_path "\
60667         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60668         "/p:Configuration=\"Release Multithreaded\" "\
60669         "/p:Platform=$freetype_platform "\
60670         "/p:ConfigurationType=DynamicLibrary "\
60671         "/p:TargetName=freetype "\
60672         "/p:OutDir=\"$freetype_lib_path\" "\
60673         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60674     cmd /c freetype.bat
60675 
60676     if test -s "$freetype_lib_path_unix/freetype.dll"; then
60677       # If that succeeds we also build freetype.lib
60678       $ECHO -e "@echo off\n"\
60679           "$MSBUILD $vcxproj_path "\
60680           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60681           "/p:Configuration=\"Release Multithreaded\" "\
60682           "/p:Platform=$freetype_platform "\
60683           "/p:ConfigurationType=StaticLibrary "\
60684           "/p:TargetName=freetype "\
60685           "/p:OutDir=\"$freetype_lib_path\" "\
60686           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60687       cmd /c freetype.bat
60688 
60689       if test -s "$freetype_lib_path_unix/freetype.lib"; then
60690         # Once we build both, lib and dll, set freetype lib and include path appropriately
60691         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60692         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60693         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60694 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60695       else
60696         BUILD_FREETYPE=no
60697       fi
60698     else
60699       BUILD_FREETYPE=no
60700     fi
60701   fi
60702 
60703               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60704 
60705   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60706   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60707   METHOD="well-known location"
60708 
60709   # Let's start with an optimistic view of the world :-)
60710   FOUND_FREETYPE=yes
60711 
60712   # First look for the canonical freetype main include file ft2build.h.
60713   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60714     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60715     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60716     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60717       # Fail.
60718       FOUND_FREETYPE=no
60719     fi
60720   fi
60721 
60722   if test "x$FOUND_FREETYPE" = xyes; then
60723     # Include file found, let's continue the sanity check.
60724     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60725 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60726 
60727     # Reset to default value
60728     FREETYPE_BASE_NAME=freetype
60729     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60730     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60731       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60732           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60733         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60734         # for the .6 version explicitly.
60735         FREETYPE_BASE_NAME=freetype.6
60736         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60737         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60738 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60739       else
60740         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60741 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60742         FOUND_FREETYPE=no
60743       fi
60744     else
60745       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60746         # On Windows, we will need both .lib and .dll file.
60747         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60748           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60749 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60750           FOUND_FREETYPE=no
60751         fi
60752       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60753           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60754         # Found lib in isa dir, use that instead.
60755         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60756         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60757 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60758       fi
60759     fi
60760   fi
60761 
60762   if test "x$FOUND_FREETYPE" = xyes; then
60763 
60764   # Only process if variable expands to non-empty
60765 
60766   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60767     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60768 
60769   # Input might be given as Windows format, start by converting to
60770   # unix format.
60771   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60772   new_path=`$CYGPATH -u "$path"`
60773 
60774   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60775   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60776   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60777   # "foo.exe" is OK but "foo" is an error.
60778   #
60779   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60780   # It is also a way to make sure we got the proper file name for the real test later on.
60781   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60782   if test "x$test_shortpath" = x; then
60783     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60784 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60785     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60786   fi
60787 
60788   # Call helper function which possibly converts this using DOS-style short mode.
60789   # If so, the updated path is stored in $new_path.
60790 
60791   input_path="$new_path"
60792   # Check if we need to convert this using DOS-style short mode. If the path
60793   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60794   # take no chances and rewrite it.
60795   # Note: m4 eats our [], so we need to use [ and ] instead.
60796   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60797   if test "x$has_forbidden_chars" != x; then
60798     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60799     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60800     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60801     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60802       # Going to short mode and back again did indeed matter. Since short mode is
60803       # case insensitive, let's make it lowercase to improve readability.
60804       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60805       # Now convert it back to Unix-style (cygpath)
60806       input_path=`$CYGPATH -u "$shortmode_path"`
60807       new_path="$input_path"
60808     fi
60809   fi
60810 
60811   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60812   if test "x$test_cygdrive_prefix" = x; then
60813     # As a simple fix, exclude /usr/bin since it's not a real path.
60814     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60815       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60816       # a path prefixed by /cygdrive for fixpath to work.
60817       new_path="$CYGWIN_ROOT_PATH$input_path"
60818     fi
60819   fi
60820 
60821 
60822   if test "x$path" != "x$new_path"; then
60823     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60824     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60825 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60826   fi
60827 
60828     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60829 
60830   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60831   has_colon=`$ECHO $path | $GREP ^.:`
60832   new_path="$path"
60833   if test "x$has_colon" = x; then
60834     # Not in mixed or Windows style, start by that.
60835     new_path=`cmd //c echo $path`
60836   fi
60837 
60838 
60839   input_path="$new_path"
60840   # Check if we need to convert this using DOS-style short mode. If the path
60841   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60842   # take no chances and rewrite it.
60843   # Note: m4 eats our [], so we need to use [ and ] instead.
60844   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60845   if test "x$has_forbidden_chars" != x; then
60846     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60847     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60848   fi
60849 
60850 
60851   windows_path="$new_path"
60852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60853     unix_path=`$CYGPATH -u "$windows_path"`
60854     new_path="$unix_path"
60855   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60856     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60857     new_path="$unix_path"
60858   fi
60859 
60860   if test "x$path" != "x$new_path"; then
60861     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60862     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60863 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60864   fi
60865 
60866   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60867   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60868 
60869     else
60870       # We're on a unix platform. Hooray! :)
60871       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60872       has_space=`$ECHO "$path" | $GREP " "`
60873       if test "x$has_space" != x; then
60874         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60875 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60876         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60877       fi
60878 
60879       # Use eval to expand a potential ~
60880       eval path="$path"
60881       if test ! -f "$path" && test ! -d "$path"; then
60882         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60883       fi
60884 
60885       if test -d "$path"; then
60886         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60887       else
60888         dir="`$DIRNAME "$path"`"
60889         base="`$BASENAME "$path"`"
60890         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60891       fi
60892     fi
60893   fi
60894 
60895 
60896   # Only process if variable expands to non-empty
60897 
60898   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60899     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60900 
60901   # Input might be given as Windows format, start by converting to
60902   # unix format.
60903   path="$POTENTIAL_FREETYPE_LIB_PATH"
60904   new_path=`$CYGPATH -u "$path"`
60905 
60906   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60907   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60908   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60909   # "foo.exe" is OK but "foo" is an error.
60910   #
60911   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60912   # It is also a way to make sure we got the proper file name for the real test later on.
60913   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60914   if test "x$test_shortpath" = x; then
60915     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60916 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60917     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60918   fi
60919 
60920   # Call helper function which possibly converts this using DOS-style short mode.
60921   # If so, the updated path is stored in $new_path.
60922 
60923   input_path="$new_path"
60924   # Check if we need to convert this using DOS-style short mode. If the path
60925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60926   # take no chances and rewrite it.
60927   # Note: m4 eats our [], so we need to use [ and ] instead.
60928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60929   if test "x$has_forbidden_chars" != x; then
60930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60934       # Going to short mode and back again did indeed matter. Since short mode is
60935       # case insensitive, let's make it lowercase to improve readability.
60936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60937       # Now convert it back to Unix-style (cygpath)
60938       input_path=`$CYGPATH -u "$shortmode_path"`
60939       new_path="$input_path"
60940     fi
60941   fi
60942 
60943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60944   if test "x$test_cygdrive_prefix" = x; then
60945     # As a simple fix, exclude /usr/bin since it's not a real path.
60946     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60948       # a path prefixed by /cygdrive for fixpath to work.
60949       new_path="$CYGWIN_ROOT_PATH$input_path"
60950     fi
60951   fi
60952 
60953 
60954   if test "x$path" != "x$new_path"; then
60955     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60956     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60957 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60958   fi
60959 
60960     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60961 
60962   path="$POTENTIAL_FREETYPE_LIB_PATH"
60963   has_colon=`$ECHO $path | $GREP ^.:`
60964   new_path="$path"
60965   if test "x$has_colon" = x; then
60966     # Not in mixed or Windows style, start by that.
60967     new_path=`cmd //c echo $path`
60968   fi
60969 
60970 
60971   input_path="$new_path"
60972   # Check if we need to convert this using DOS-style short mode. If the path
60973   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60974   # take no chances and rewrite it.
60975   # Note: m4 eats our [], so we need to use [ and ] instead.
60976   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60977   if test "x$has_forbidden_chars" != x; then
60978     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60979     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60980   fi
60981 
60982 
60983   windows_path="$new_path"
60984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60985     unix_path=`$CYGPATH -u "$windows_path"`
60986     new_path="$unix_path"
60987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60989     new_path="$unix_path"
60990   fi
60991 
60992   if test "x$path" != "x$new_path"; then
60993     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60995 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60996   fi
60997 
60998   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60999   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61000 
61001     else
61002       # We're on a unix platform. Hooray! :)
61003       path="$POTENTIAL_FREETYPE_LIB_PATH"
61004       has_space=`$ECHO "$path" | $GREP " "`
61005       if test "x$has_space" != x; then
61006         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61007 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61008         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61009       fi
61010 
61011       # Use eval to expand a potential ~
61012       eval path="$path"
61013       if test ! -f "$path" && test ! -d "$path"; then
61014         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61015       fi
61016 
61017       if test -d "$path"; then
61018         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61019       else
61020         dir="`$DIRNAME "$path"`"
61021         base="`$BASENAME "$path"`"
61022         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61023       fi
61024     fi
61025   fi
61026 
61027 
61028     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61029     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61030 $as_echo_n "checking for freetype includes... " >&6; }
61031     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61032 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61033     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61034     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61035 $as_echo_n "checking for freetype libraries... " >&6; }
61036     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61037 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61038   fi
61039 
61040               else
61041 
61042   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61043   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61044   METHOD="well-known location"
61045 
61046   # Let's start with an optimistic view of the world :-)
61047   FOUND_FREETYPE=yes
61048 
61049   # First look for the canonical freetype main include file ft2build.h.
61050   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61051     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61052     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61053     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61054       # Fail.
61055       FOUND_FREETYPE=no
61056     fi
61057   fi
61058 
61059   if test "x$FOUND_FREETYPE" = xyes; then
61060     # Include file found, let's continue the sanity check.
61061     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61062 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61063 
61064     # Reset to default value
61065     FREETYPE_BASE_NAME=freetype
61066     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61067     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61068       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61069           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61070         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61071         # for the .6 version explicitly.
61072         FREETYPE_BASE_NAME=freetype.6
61073         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61074         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61075 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61076       else
61077         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61078 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61079         FOUND_FREETYPE=no
61080       fi
61081     else
61082       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61083         # On Windows, we will need both .lib and .dll file.
61084         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61085           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61086 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61087           FOUND_FREETYPE=no
61088         fi
61089       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61090           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61091         # Found lib in isa dir, use that instead.
61092         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61093         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61094 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61095       fi
61096     fi
61097   fi
61098 
61099   if test "x$FOUND_FREETYPE" = xyes; then
61100 
61101   # Only process if variable expands to non-empty
61102 
61103   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61104     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61105 
61106   # Input might be given as Windows format, start by converting to
61107   # unix format.
61108   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61109   new_path=`$CYGPATH -u "$path"`
61110 
61111   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61112   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61113   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61114   # "foo.exe" is OK but "foo" is an error.
61115   #
61116   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61117   # It is also a way to make sure we got the proper file name for the real test later on.
61118   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61119   if test "x$test_shortpath" = x; then
61120     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61121 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61122     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61123   fi
61124 
61125   # Call helper function which possibly converts this using DOS-style short mode.
61126   # If so, the updated path is stored in $new_path.
61127 
61128   input_path="$new_path"
61129   # Check if we need to convert this using DOS-style short mode. If the path
61130   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61131   # take no chances and rewrite it.
61132   # Note: m4 eats our [], so we need to use [ and ] instead.
61133   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61134   if test "x$has_forbidden_chars" != x; then
61135     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61136     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61137     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61138     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61139       # Going to short mode and back again did indeed matter. Since short mode is
61140       # case insensitive, let's make it lowercase to improve readability.
61141       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61142       # Now convert it back to Unix-style (cygpath)
61143       input_path=`$CYGPATH -u "$shortmode_path"`
61144       new_path="$input_path"
61145     fi
61146   fi
61147 
61148   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61149   if test "x$test_cygdrive_prefix" = x; then
61150     # As a simple fix, exclude /usr/bin since it's not a real path.
61151     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61152       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61153       # a path prefixed by /cygdrive for fixpath to work.
61154       new_path="$CYGWIN_ROOT_PATH$input_path"
61155     fi
61156   fi
61157 
61158 
61159   if test "x$path" != "x$new_path"; then
61160     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61161     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61162 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61163   fi
61164 
61165     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61166 
61167   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61168   has_colon=`$ECHO $path | $GREP ^.:`
61169   new_path="$path"
61170   if test "x$has_colon" = x; then
61171     # Not in mixed or Windows style, start by that.
61172     new_path=`cmd //c echo $path`
61173   fi
61174 
61175 
61176   input_path="$new_path"
61177   # Check if we need to convert this using DOS-style short mode. If the path
61178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61179   # take no chances and rewrite it.
61180   # Note: m4 eats our [], so we need to use [ and ] instead.
61181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61182   if test "x$has_forbidden_chars" != x; then
61183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61184     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61185   fi
61186 
61187 
61188   windows_path="$new_path"
61189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61190     unix_path=`$CYGPATH -u "$windows_path"`
61191     new_path="$unix_path"
61192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61194     new_path="$unix_path"
61195   fi
61196 
61197   if test "x$path" != "x$new_path"; then
61198     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61199     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61200 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61201   fi
61202 
61203   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61204   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61205 
61206     else
61207       # We're on a unix platform. Hooray! :)
61208       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61209       has_space=`$ECHO "$path" | $GREP " "`
61210       if test "x$has_space" != x; then
61211         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61212 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61213         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61214       fi
61215 
61216       # Use eval to expand a potential ~
61217       eval path="$path"
61218       if test ! -f "$path" && test ! -d "$path"; then
61219         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61220       fi
61221 
61222       if test -d "$path"; then
61223         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61224       else
61225         dir="`$DIRNAME "$path"`"
61226         base="`$BASENAME "$path"`"
61227         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61228       fi
61229     fi
61230   fi
61231 
61232 
61233   # Only process if variable expands to non-empty
61234 
61235   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61236     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61237 
61238   # Input might be given as Windows format, start by converting to
61239   # unix format.
61240   path="$POTENTIAL_FREETYPE_LIB_PATH"
61241   new_path=`$CYGPATH -u "$path"`
61242 
61243   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61244   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61245   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61246   # "foo.exe" is OK but "foo" is an error.
61247   #
61248   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61249   # It is also a way to make sure we got the proper file name for the real test later on.
61250   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61251   if test "x$test_shortpath" = x; then
61252     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61253 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61254     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61255   fi
61256 
61257   # Call helper function which possibly converts this using DOS-style short mode.
61258   # If so, the updated path is stored in $new_path.
61259 
61260   input_path="$new_path"
61261   # Check if we need to convert this using DOS-style short mode. If the path
61262   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61263   # take no chances and rewrite it.
61264   # Note: m4 eats our [], so we need to use [ and ] instead.
61265   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61266   if test "x$has_forbidden_chars" != x; then
61267     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61268     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61269     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61270     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61271       # Going to short mode and back again did indeed matter. Since short mode is
61272       # case insensitive, let's make it lowercase to improve readability.
61273       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61274       # Now convert it back to Unix-style (cygpath)
61275       input_path=`$CYGPATH -u "$shortmode_path"`
61276       new_path="$input_path"
61277     fi
61278   fi
61279 
61280   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61281   if test "x$test_cygdrive_prefix" = x; then
61282     # As a simple fix, exclude /usr/bin since it's not a real path.
61283     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61284       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61285       # a path prefixed by /cygdrive for fixpath to work.
61286       new_path="$CYGWIN_ROOT_PATH$input_path"
61287     fi
61288   fi
61289 
61290 
61291   if test "x$path" != "x$new_path"; then
61292     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61293     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61294 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61295   fi
61296 
61297     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61298 
61299   path="$POTENTIAL_FREETYPE_LIB_PATH"
61300   has_colon=`$ECHO $path | $GREP ^.:`
61301   new_path="$path"
61302   if test "x$has_colon" = x; then
61303     # Not in mixed or Windows style, start by that.
61304     new_path=`cmd //c echo $path`
61305   fi
61306 
61307 
61308   input_path="$new_path"
61309   # Check if we need to convert this using DOS-style short mode. If the path
61310   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61311   # take no chances and rewrite it.
61312   # Note: m4 eats our [], so we need to use [ and ] instead.
61313   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61314   if test "x$has_forbidden_chars" != x; then
61315     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61316     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61317   fi
61318 
61319 
61320   windows_path="$new_path"
61321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61322     unix_path=`$CYGPATH -u "$windows_path"`
61323     new_path="$unix_path"
61324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61325     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61326     new_path="$unix_path"
61327   fi
61328 
61329   if test "x$path" != "x$new_path"; then
61330     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61331     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61332 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61333   fi
61334 
61335   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61336   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61337 
61338     else
61339       # We're on a unix platform. Hooray! :)
61340       path="$POTENTIAL_FREETYPE_LIB_PATH"
61341       has_space=`$ECHO "$path" | $GREP " "`
61342       if test "x$has_space" != x; then
61343         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61344 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61345         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61346       fi
61347 
61348       # Use eval to expand a potential ~
61349       eval path="$path"
61350       if test ! -f "$path" && test ! -d "$path"; then
61351         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61352       fi
61353 
61354       if test -d "$path"; then
61355         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61356       else
61357         dir="`$DIRNAME "$path"`"
61358         base="`$BASENAME "$path"`"
61359         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61360       fi
61361     fi
61362   fi
61363 
61364 
61365     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61366     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61367 $as_echo_n "checking for freetype includes... " >&6; }
61368     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61369 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61370     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61371     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61372 $as_echo_n "checking for freetype libraries... " >&6; }
61373     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61374 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61375   fi
61376 
61377               fi
61378             fi
61379           fi
61380         else
61381           FREETYPE_BASE_DIR="$SYSROOT/usr"
61382 
61383   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61384   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61385   METHOD="well-known location"
61386 
61387   # Let's start with an optimistic view of the world :-)
61388   FOUND_FREETYPE=yes
61389 
61390   # First look for the canonical freetype main include file ft2build.h.
61391   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61392     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61393     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61394     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61395       # Fail.
61396       FOUND_FREETYPE=no
61397     fi
61398   fi
61399 
61400   if test "x$FOUND_FREETYPE" = xyes; then
61401     # Include file found, let's continue the sanity check.
61402     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61403 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61404 
61405     # Reset to default value
61406     FREETYPE_BASE_NAME=freetype
61407     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61408     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61409       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61410           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61411         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61412         # for the .6 version explicitly.
61413         FREETYPE_BASE_NAME=freetype.6
61414         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61415         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61416 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61417       else
61418         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61419 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61420         FOUND_FREETYPE=no
61421       fi
61422     else
61423       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61424         # On Windows, we will need both .lib and .dll file.
61425         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61426           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61427 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61428           FOUND_FREETYPE=no
61429         fi
61430       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61431           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61432         # Found lib in isa dir, use that instead.
61433         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61434         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61435 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61436       fi
61437     fi
61438   fi
61439 
61440   if test "x$FOUND_FREETYPE" = xyes; then
61441 
61442   # Only process if variable expands to non-empty
61443 
61444   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61445     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61446 
61447   # Input might be given as Windows format, start by converting to
61448   # unix format.
61449   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61450   new_path=`$CYGPATH -u "$path"`
61451 
61452   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61453   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61454   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61455   # "foo.exe" is OK but "foo" is an error.
61456   #
61457   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61458   # It is also a way to make sure we got the proper file name for the real test later on.
61459   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61460   if test "x$test_shortpath" = x; then
61461     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61462 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61463     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61464   fi
61465 
61466   # Call helper function which possibly converts this using DOS-style short mode.
61467   # If so, the updated path is stored in $new_path.
61468 
61469   input_path="$new_path"
61470   # Check if we need to convert this using DOS-style short mode. If the path
61471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61472   # take no chances and rewrite it.
61473   # Note: m4 eats our [], so we need to use [ and ] instead.
61474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61475   if test "x$has_forbidden_chars" != x; then
61476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61477     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61478     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61479     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61480       # Going to short mode and back again did indeed matter. Since short mode is
61481       # case insensitive, let's make it lowercase to improve readability.
61482       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61483       # Now convert it back to Unix-style (cygpath)
61484       input_path=`$CYGPATH -u "$shortmode_path"`
61485       new_path="$input_path"
61486     fi
61487   fi
61488 
61489   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61490   if test "x$test_cygdrive_prefix" = x; then
61491     # As a simple fix, exclude /usr/bin since it's not a real path.
61492     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61493       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61494       # a path prefixed by /cygdrive for fixpath to work.
61495       new_path="$CYGWIN_ROOT_PATH$input_path"
61496     fi
61497   fi
61498 
61499 
61500   if test "x$path" != "x$new_path"; then
61501     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61502     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61503 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61504   fi
61505 
61506     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61507 
61508   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61509   has_colon=`$ECHO $path | $GREP ^.:`
61510   new_path="$path"
61511   if test "x$has_colon" = x; then
61512     # Not in mixed or Windows style, start by that.
61513     new_path=`cmd //c echo $path`
61514   fi
61515 
61516 
61517   input_path="$new_path"
61518   # Check if we need to convert this using DOS-style short mode. If the path
61519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61520   # take no chances and rewrite it.
61521   # Note: m4 eats our [], so we need to use [ and ] instead.
61522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61523   if test "x$has_forbidden_chars" != x; then
61524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61525     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61526   fi
61527 
61528 
61529   windows_path="$new_path"
61530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61531     unix_path=`$CYGPATH -u "$windows_path"`
61532     new_path="$unix_path"
61533   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61534     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61535     new_path="$unix_path"
61536   fi
61537 
61538   if test "x$path" != "x$new_path"; then
61539     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61540     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61541 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61542   fi
61543 
61544   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61545   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61546 
61547     else
61548       # We're on a unix platform. Hooray! :)
61549       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61550       has_space=`$ECHO "$path" | $GREP " "`
61551       if test "x$has_space" != x; then
61552         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61553 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61554         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61555       fi
61556 
61557       # Use eval to expand a potential ~
61558       eval path="$path"
61559       if test ! -f "$path" && test ! -d "$path"; then
61560         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61561       fi
61562 
61563       if test -d "$path"; then
61564         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61565       else
61566         dir="`$DIRNAME "$path"`"
61567         base="`$BASENAME "$path"`"
61568         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61569       fi
61570     fi
61571   fi
61572 
61573 
61574   # Only process if variable expands to non-empty
61575 
61576   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61577     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61578 
61579   # Input might be given as Windows format, start by converting to
61580   # unix format.
61581   path="$POTENTIAL_FREETYPE_LIB_PATH"
61582   new_path=`$CYGPATH -u "$path"`
61583 
61584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61587   # "foo.exe" is OK but "foo" is an error.
61588   #
61589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61590   # It is also a way to make sure we got the proper file name for the real test later on.
61591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61592   if test "x$test_shortpath" = x; then
61593     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61594 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61595     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61596   fi
61597 
61598   # Call helper function which possibly converts this using DOS-style short mode.
61599   # If so, the updated path is stored in $new_path.
61600 
61601   input_path="$new_path"
61602   # Check if we need to convert this using DOS-style short mode. If the path
61603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61604   # take no chances and rewrite it.
61605   # Note: m4 eats our [], so we need to use [ and ] instead.
61606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61607   if test "x$has_forbidden_chars" != x; then
61608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61609     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61610     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61611     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61612       # Going to short mode and back again did indeed matter. Since short mode is
61613       # case insensitive, let's make it lowercase to improve readability.
61614       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61615       # Now convert it back to Unix-style (cygpath)
61616       input_path=`$CYGPATH -u "$shortmode_path"`
61617       new_path="$input_path"
61618     fi
61619   fi
61620 
61621   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61622   if test "x$test_cygdrive_prefix" = x; then
61623     # As a simple fix, exclude /usr/bin since it's not a real path.
61624     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61625       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61626       # a path prefixed by /cygdrive for fixpath to work.
61627       new_path="$CYGWIN_ROOT_PATH$input_path"
61628     fi
61629   fi
61630 
61631 
61632   if test "x$path" != "x$new_path"; then
61633     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61635 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61636   fi
61637 
61638     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61639 
61640   path="$POTENTIAL_FREETYPE_LIB_PATH"
61641   has_colon=`$ECHO $path | $GREP ^.:`
61642   new_path="$path"
61643   if test "x$has_colon" = x; then
61644     # Not in mixed or Windows style, start by that.
61645     new_path=`cmd //c echo $path`
61646   fi
61647 
61648 
61649   input_path="$new_path"
61650   # Check if we need to convert this using DOS-style short mode. If the path
61651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61652   # take no chances and rewrite it.
61653   # Note: m4 eats our [], so we need to use [ and ] instead.
61654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61655   if test "x$has_forbidden_chars" != x; then
61656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61657     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61658   fi
61659 
61660 
61661   windows_path="$new_path"
61662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61663     unix_path=`$CYGPATH -u "$windows_path"`
61664     new_path="$unix_path"
61665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61667     new_path="$unix_path"
61668   fi
61669 
61670   if test "x$path" != "x$new_path"; then
61671     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61673 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61674   fi
61675 
61676   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61677   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61678 
61679     else
61680       # We're on a unix platform. Hooray! :)
61681       path="$POTENTIAL_FREETYPE_LIB_PATH"
61682       has_space=`$ECHO "$path" | $GREP " "`
61683       if test "x$has_space" != x; then
61684         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61685 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61686         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61687       fi
61688 
61689       # Use eval to expand a potential ~
61690       eval path="$path"
61691       if test ! -f "$path" && test ! -d "$path"; then
61692         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61693       fi
61694 
61695       if test -d "$path"; then
61696         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61697       else
61698         dir="`$DIRNAME "$path"`"
61699         base="`$BASENAME "$path"`"
61700         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61701       fi
61702     fi
61703   fi
61704 
61705 
61706     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61707     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61708 $as_echo_n "checking for freetype includes... " >&6; }
61709     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61710 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61711     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61712     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61713 $as_echo_n "checking for freetype libraries... " >&6; }
61714     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61715 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61716   fi
61717 
61718 
61719           if test "x$FOUND_FREETYPE" != xyes; then
61720             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61721 
61722   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61723   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61724   METHOD="well-known location"
61725 
61726   # Let's start with an optimistic view of the world :-)
61727   FOUND_FREETYPE=yes
61728 
61729   # First look for the canonical freetype main include file ft2build.h.
61730   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61731     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61732     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61733     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61734       # Fail.
61735       FOUND_FREETYPE=no
61736     fi
61737   fi
61738 
61739   if test "x$FOUND_FREETYPE" = xyes; then
61740     # Include file found, let's continue the sanity check.
61741     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61742 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61743 
61744     # Reset to default value
61745     FREETYPE_BASE_NAME=freetype
61746     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61747     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61748       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61749           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61750         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61751         # for the .6 version explicitly.
61752         FREETYPE_BASE_NAME=freetype.6
61753         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61754         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61755 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61756       else
61757         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61758 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61759         FOUND_FREETYPE=no
61760       fi
61761     else
61762       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61763         # On Windows, we will need both .lib and .dll file.
61764         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61765           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61766 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61767           FOUND_FREETYPE=no
61768         fi
61769       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61770           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61771         # Found lib in isa dir, use that instead.
61772         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61773         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61774 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61775       fi
61776     fi
61777   fi
61778 
61779   if test "x$FOUND_FREETYPE" = xyes; then
61780 
61781   # Only process if variable expands to non-empty
61782 
61783   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61784     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61785 
61786   # Input might be given as Windows format, start by converting to
61787   # unix format.
61788   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61789   new_path=`$CYGPATH -u "$path"`
61790 
61791   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61792   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61793   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61794   # "foo.exe" is OK but "foo" is an error.
61795   #
61796   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61797   # It is also a way to make sure we got the proper file name for the real test later on.
61798   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61799   if test "x$test_shortpath" = x; then
61800     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61801 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61802     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61803   fi
61804 
61805   # Call helper function which possibly converts this using DOS-style short mode.
61806   # If so, the updated path is stored in $new_path.
61807 
61808   input_path="$new_path"
61809   # Check if we need to convert this using DOS-style short mode. If the path
61810   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61811   # take no chances and rewrite it.
61812   # Note: m4 eats our [], so we need to use [ and ] instead.
61813   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61814   if test "x$has_forbidden_chars" != x; then
61815     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61816     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61817     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61818     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61819       # Going to short mode and back again did indeed matter. Since short mode is
61820       # case insensitive, let's make it lowercase to improve readability.
61821       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61822       # Now convert it back to Unix-style (cygpath)
61823       input_path=`$CYGPATH -u "$shortmode_path"`
61824       new_path="$input_path"
61825     fi
61826   fi
61827 
61828   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61829   if test "x$test_cygdrive_prefix" = x; then
61830     # As a simple fix, exclude /usr/bin since it's not a real path.
61831     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61832       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61833       # a path prefixed by /cygdrive for fixpath to work.
61834       new_path="$CYGWIN_ROOT_PATH$input_path"
61835     fi
61836   fi
61837 
61838 
61839   if test "x$path" != "x$new_path"; then
61840     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61841     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61842 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61843   fi
61844 
61845     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61846 
61847   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61848   has_colon=`$ECHO $path | $GREP ^.:`
61849   new_path="$path"
61850   if test "x$has_colon" = x; then
61851     # Not in mixed or Windows style, start by that.
61852     new_path=`cmd //c echo $path`
61853   fi
61854 
61855 
61856   input_path="$new_path"
61857   # Check if we need to convert this using DOS-style short mode. If the path
61858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61859   # take no chances and rewrite it.
61860   # Note: m4 eats our [], so we need to use [ and ] instead.
61861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61862   if test "x$has_forbidden_chars" != x; then
61863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61864     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61865   fi
61866 
61867 
61868   windows_path="$new_path"
61869   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61870     unix_path=`$CYGPATH -u "$windows_path"`
61871     new_path="$unix_path"
61872   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61873     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61874     new_path="$unix_path"
61875   fi
61876 
61877   if test "x$path" != "x$new_path"; then
61878     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61879     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61880 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61881   fi
61882 
61883   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61884   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61885 
61886     else
61887       # We're on a unix platform. Hooray! :)
61888       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61889       has_space=`$ECHO "$path" | $GREP " "`
61890       if test "x$has_space" != x; then
61891         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61892 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61893         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61894       fi
61895 
61896       # Use eval to expand a potential ~
61897       eval path="$path"
61898       if test ! -f "$path" && test ! -d "$path"; then
61899         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61900       fi
61901 
61902       if test -d "$path"; then
61903         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61904       else
61905         dir="`$DIRNAME "$path"`"
61906         base="`$BASENAME "$path"`"
61907         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61908       fi
61909     fi
61910   fi
61911 
61912 
61913   # Only process if variable expands to non-empty
61914 
61915   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61916     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61917 
61918   # Input might be given as Windows format, start by converting to
61919   # unix format.
61920   path="$POTENTIAL_FREETYPE_LIB_PATH"
61921   new_path=`$CYGPATH -u "$path"`
61922 
61923   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61924   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61925   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61926   # "foo.exe" is OK but "foo" is an error.
61927   #
61928   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61929   # It is also a way to make sure we got the proper file name for the real test later on.
61930   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61931   if test "x$test_shortpath" = x; then
61932     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61933 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61934     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61935   fi
61936 
61937   # Call helper function which possibly converts this using DOS-style short mode.
61938   # If so, the updated path is stored in $new_path.
61939 
61940   input_path="$new_path"
61941   # Check if we need to convert this using DOS-style short mode. If the path
61942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61943   # take no chances and rewrite it.
61944   # Note: m4 eats our [], so we need to use [ and ] instead.
61945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61946   if test "x$has_forbidden_chars" != x; then
61947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61948     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61949     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61950     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61951       # Going to short mode and back again did indeed matter. Since short mode is
61952       # case insensitive, let's make it lowercase to improve readability.
61953       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61954       # Now convert it back to Unix-style (cygpath)
61955       input_path=`$CYGPATH -u "$shortmode_path"`
61956       new_path="$input_path"
61957     fi
61958   fi
61959 
61960   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61961   if test "x$test_cygdrive_prefix" = x; then
61962     # As a simple fix, exclude /usr/bin since it's not a real path.
61963     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61964       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61965       # a path prefixed by /cygdrive for fixpath to work.
61966       new_path="$CYGWIN_ROOT_PATH$input_path"
61967     fi
61968   fi
61969 
61970 
61971   if test "x$path" != "x$new_path"; then
61972     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61974 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61975   fi
61976 
61977     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61978 
61979   path="$POTENTIAL_FREETYPE_LIB_PATH"
61980   has_colon=`$ECHO $path | $GREP ^.:`
61981   new_path="$path"
61982   if test "x$has_colon" = x; then
61983     # Not in mixed or Windows style, start by that.
61984     new_path=`cmd //c echo $path`
61985   fi
61986 
61987 
61988   input_path="$new_path"
61989   # Check if we need to convert this using DOS-style short mode. If the path
61990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61991   # take no chances and rewrite it.
61992   # Note: m4 eats our [], so we need to use [ and ] instead.
61993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61994   if test "x$has_forbidden_chars" != x; then
61995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61996     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61997   fi
61998 
61999 
62000   windows_path="$new_path"
62001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62002     unix_path=`$CYGPATH -u "$windows_path"`
62003     new_path="$unix_path"
62004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62006     new_path="$unix_path"
62007   fi
62008 
62009   if test "x$path" != "x$new_path"; then
62010     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62011     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62012 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62013   fi
62014 
62015   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62016   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62017 
62018     else
62019       # We're on a unix platform. Hooray! :)
62020       path="$POTENTIAL_FREETYPE_LIB_PATH"
62021       has_space=`$ECHO "$path" | $GREP " "`
62022       if test "x$has_space" != x; then
62023         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62024 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62025         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62026       fi
62027 
62028       # Use eval to expand a potential ~
62029       eval path="$path"
62030       if test ! -f "$path" && test ! -d "$path"; then
62031         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62032       fi
62033 
62034       if test -d "$path"; then
62035         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62036       else
62037         dir="`$DIRNAME "$path"`"
62038         base="`$BASENAME "$path"`"
62039         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62040       fi
62041     fi
62042   fi
62043 
62044 
62045     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62046     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62047 $as_echo_n "checking for freetype includes... " >&6; }
62048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62049 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62050     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62051     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62052 $as_echo_n "checking for freetype libraries... " >&6; }
62053     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62054 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62055   fi
62056 
62057           fi
62058           if test "x$FOUND_FREETYPE" != xyes; then
62059             FREETYPE_BASE_DIR="$SYSROOT/usr/local"
62060 
62061   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62062   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62063   METHOD="well-known location"
62064 
62065   # Let's start with an optimistic view of the world :-)
62066   FOUND_FREETYPE=yes
62067 
62068   # First look for the canonical freetype main include file ft2build.h.
62069   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62070     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62071     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62072     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62073       # Fail.
62074       FOUND_FREETYPE=no
62075     fi
62076   fi
62077 
62078   if test "x$FOUND_FREETYPE" = xyes; then
62079     # Include file found, let's continue the sanity check.
62080     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62081 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62082 
62083     # Reset to default value
62084     FREETYPE_BASE_NAME=freetype
62085     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62086     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62087       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62088           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62089         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62090         # for the .6 version explicitly.
62091         FREETYPE_BASE_NAME=freetype.6
62092         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62093         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62094 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62095       else
62096         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62097 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62098         FOUND_FREETYPE=no
62099       fi
62100     else
62101       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62102         # On Windows, we will need both .lib and .dll file.
62103         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62104           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62105 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62106           FOUND_FREETYPE=no
62107         fi
62108       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62109           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62110         # Found lib in isa dir, use that instead.
62111         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62112         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62113 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62114       fi
62115     fi
62116   fi
62117 
62118   if test "x$FOUND_FREETYPE" = xyes; then
62119 
62120   # Only process if variable expands to non-empty
62121 
62122   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62123     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62124 
62125   # Input might be given as Windows format, start by converting to
62126   # unix format.
62127   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62128   new_path=`$CYGPATH -u "$path"`
62129 
62130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62133   # "foo.exe" is OK but "foo" is an error.
62134   #
62135   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62136   # It is also a way to make sure we got the proper file name for the real test later on.
62137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62138   if test "x$test_shortpath" = x; then
62139     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62140 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62141     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62142   fi
62143 
62144   # Call helper function which possibly converts this using DOS-style short mode.
62145   # If so, the updated path is stored in $new_path.
62146 
62147   input_path="$new_path"
62148   # Check if we need to convert this using DOS-style short mode. If the path
62149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62150   # take no chances and rewrite it.
62151   # Note: m4 eats our [], so we need to use [ and ] instead.
62152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62153   if test "x$has_forbidden_chars" != x; then
62154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62155     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62156     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62157     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62158       # Going to short mode and back again did indeed matter. Since short mode is
62159       # case insensitive, let's make it lowercase to improve readability.
62160       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62161       # Now convert it back to Unix-style (cygpath)
62162       input_path=`$CYGPATH -u "$shortmode_path"`
62163       new_path="$input_path"
62164     fi
62165   fi
62166 
62167   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62168   if test "x$test_cygdrive_prefix" = x; then
62169     # As a simple fix, exclude /usr/bin since it's not a real path.
62170     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62171       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62172       # a path prefixed by /cygdrive for fixpath to work.
62173       new_path="$CYGWIN_ROOT_PATH$input_path"
62174     fi
62175   fi
62176 
62177 
62178   if test "x$path" != "x$new_path"; then
62179     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62181 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62182   fi
62183 
62184     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62185 
62186   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62187   has_colon=`$ECHO $path | $GREP ^.:`
62188   new_path="$path"
62189   if test "x$has_colon" = x; then
62190     # Not in mixed or Windows style, start by that.
62191     new_path=`cmd //c echo $path`
62192   fi
62193 
62194 
62195   input_path="$new_path"
62196   # Check if we need to convert this using DOS-style short mode. If the path
62197   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62198   # take no chances and rewrite it.
62199   # Note: m4 eats our [], so we need to use [ and ] instead.
62200   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62201   if test "x$has_forbidden_chars" != x; then
62202     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62203     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62204   fi
62205 
62206 
62207   windows_path="$new_path"
62208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62209     unix_path=`$CYGPATH -u "$windows_path"`
62210     new_path="$unix_path"
62211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62213     new_path="$unix_path"
62214   fi
62215 
62216   if test "x$path" != "x$new_path"; then
62217     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62219 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62220   fi
62221 
62222   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62223   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62224 
62225     else
62226       # We're on a unix platform. Hooray! :)
62227       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62228       has_space=`$ECHO "$path" | $GREP " "`
62229       if test "x$has_space" != x; then
62230         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62231 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62232         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62233       fi
62234 
62235       # Use eval to expand a potential ~
62236       eval path="$path"
62237       if test ! -f "$path" && test ! -d "$path"; then
62238         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62239       fi
62240 
62241       if test -d "$path"; then
62242         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62243       else
62244         dir="`$DIRNAME "$path"`"
62245         base="`$BASENAME "$path"`"
62246         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62247       fi
62248     fi
62249   fi
62250 
62251 
62252   # Only process if variable expands to non-empty
62253 
62254   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62255     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62256 
62257   # Input might be given as Windows format, start by converting to
62258   # unix format.
62259   path="$POTENTIAL_FREETYPE_LIB_PATH"
62260   new_path=`$CYGPATH -u "$path"`
62261 
62262   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62263   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62264   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62265   # "foo.exe" is OK but "foo" is an error.
62266   #
62267   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62268   # It is also a way to make sure we got the proper file name for the real test later on.
62269   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62270   if test "x$test_shortpath" = x; then
62271     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62272 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62273     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62274   fi
62275 
62276   # Call helper function which possibly converts this using DOS-style short mode.
62277   # If so, the updated path is stored in $new_path.
62278 
62279   input_path="$new_path"
62280   # Check if we need to convert this using DOS-style short mode. If the path
62281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62282   # take no chances and rewrite it.
62283   # Note: m4 eats our [], so we need to use [ and ] instead.
62284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62285   if test "x$has_forbidden_chars" != x; then
62286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62287     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62288     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62289     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62290       # Going to short mode and back again did indeed matter. Since short mode is
62291       # case insensitive, let's make it lowercase to improve readability.
62292       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62293       # Now convert it back to Unix-style (cygpath)
62294       input_path=`$CYGPATH -u "$shortmode_path"`
62295       new_path="$input_path"
62296     fi
62297   fi
62298 
62299   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62300   if test "x$test_cygdrive_prefix" = x; then
62301     # As a simple fix, exclude /usr/bin since it's not a real path.
62302     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62303       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62304       # a path prefixed by /cygdrive for fixpath to work.
62305       new_path="$CYGWIN_ROOT_PATH$input_path"
62306     fi
62307   fi
62308 
62309 
62310   if test "x$path" != "x$new_path"; then
62311     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62313 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62314   fi
62315 
62316     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62317 
62318   path="$POTENTIAL_FREETYPE_LIB_PATH"
62319   has_colon=`$ECHO $path | $GREP ^.:`
62320   new_path="$path"
62321   if test "x$has_colon" = x; then
62322     # Not in mixed or Windows style, start by that.
62323     new_path=`cmd //c echo $path`
62324   fi
62325 
62326 
62327   input_path="$new_path"
62328   # Check if we need to convert this using DOS-style short mode. If the path
62329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62330   # take no chances and rewrite it.
62331   # Note: m4 eats our [], so we need to use [ and ] instead.
62332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62333   if test "x$has_forbidden_chars" != x; then
62334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62335     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62336   fi
62337 
62338 
62339   windows_path="$new_path"
62340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62341     unix_path=`$CYGPATH -u "$windows_path"`
62342     new_path="$unix_path"
62343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62345     new_path="$unix_path"
62346   fi
62347 
62348   if test "x$path" != "x$new_path"; then
62349     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62350     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62351 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62352   fi
62353 
62354   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62355   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62356 
62357     else
62358       # We're on a unix platform. Hooray! :)
62359       path="$POTENTIAL_FREETYPE_LIB_PATH"
62360       has_space=`$ECHO "$path" | $GREP " "`
62361       if test "x$has_space" != x; then
62362         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62363 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62364         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62365       fi
62366 
62367       # Use eval to expand a potential ~
62368       eval path="$path"
62369       if test ! -f "$path" && test ! -d "$path"; then
62370         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62371       fi
62372 
62373       if test -d "$path"; then
62374         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62375       else
62376         dir="`$DIRNAME "$path"`"
62377         base="`$BASENAME "$path"`"
62378         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62379       fi
62380     fi
62381   fi
62382 
62383 
62384     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62385     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62386 $as_echo_n "checking for freetype includes... " >&6; }
62387     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62388 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62389     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62390     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62391 $as_echo_n "checking for freetype libraries... " >&6; }
62392     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62393 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62394   fi
62395 
62396           fi
62397 
62398           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62399             if test "x$FOUND_FREETYPE" != xyes; then
62400               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62401               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62402 
62403   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62404   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62405   METHOD="well-known location"
62406 
62407   # Let's start with an optimistic view of the world :-)
62408   FOUND_FREETYPE=yes
62409 
62410   # First look for the canonical freetype main include file ft2build.h.
62411   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62412     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62413     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62414     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62415       # Fail.
62416       FOUND_FREETYPE=no
62417     fi
62418   fi
62419 
62420   if test "x$FOUND_FREETYPE" = xyes; then
62421     # Include file found, let's continue the sanity check.
62422     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62423 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62424 
62425     # Reset to default value
62426     FREETYPE_BASE_NAME=freetype
62427     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62428     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62429       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62430           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62431         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62432         # for the .6 version explicitly.
62433         FREETYPE_BASE_NAME=freetype.6
62434         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62435         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62436 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62437       else
62438         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62439 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62440         FOUND_FREETYPE=no
62441       fi
62442     else
62443       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62444         # On Windows, we will need both .lib and .dll file.
62445         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62446           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62447 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62448           FOUND_FREETYPE=no
62449         fi
62450       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62451           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62452         # Found lib in isa dir, use that instead.
62453         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62454         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62455 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62456       fi
62457     fi
62458   fi
62459 
62460   if test "x$FOUND_FREETYPE" = xyes; then
62461 
62462   # Only process if variable expands to non-empty
62463 
62464   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62465     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62466 
62467   # Input might be given as Windows format, start by converting to
62468   # unix format.
62469   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62470   new_path=`$CYGPATH -u "$path"`
62471 
62472   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62473   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62474   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62475   # "foo.exe" is OK but "foo" is an error.
62476   #
62477   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62478   # It is also a way to make sure we got the proper file name for the real test later on.
62479   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62480   if test "x$test_shortpath" = x; then
62481     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62482 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62483     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62484   fi
62485 
62486   # Call helper function which possibly converts this using DOS-style short mode.
62487   # If so, the updated path is stored in $new_path.
62488 
62489   input_path="$new_path"
62490   # Check if we need to convert this using DOS-style short mode. If the path
62491   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62492   # take no chances and rewrite it.
62493   # Note: m4 eats our [], so we need to use [ and ] instead.
62494   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62495   if test "x$has_forbidden_chars" != x; then
62496     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62497     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62498     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62499     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62500       # Going to short mode and back again did indeed matter. Since short mode is
62501       # case insensitive, let's make it lowercase to improve readability.
62502       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62503       # Now convert it back to Unix-style (cygpath)
62504       input_path=`$CYGPATH -u "$shortmode_path"`
62505       new_path="$input_path"
62506     fi
62507   fi
62508 
62509   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62510   if test "x$test_cygdrive_prefix" = x; then
62511     # As a simple fix, exclude /usr/bin since it's not a real path.
62512     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62513       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62514       # a path prefixed by /cygdrive for fixpath to work.
62515       new_path="$CYGWIN_ROOT_PATH$input_path"
62516     fi
62517   fi
62518 
62519 
62520   if test "x$path" != "x$new_path"; then
62521     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62522     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62523 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62524   fi
62525 
62526     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62527 
62528   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62529   has_colon=`$ECHO $path | $GREP ^.:`
62530   new_path="$path"
62531   if test "x$has_colon" = x; then
62532     # Not in mixed or Windows style, start by that.
62533     new_path=`cmd //c echo $path`
62534   fi
62535 
62536 
62537   input_path="$new_path"
62538   # Check if we need to convert this using DOS-style short mode. If the path
62539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62540   # take no chances and rewrite it.
62541   # Note: m4 eats our [], so we need to use [ and ] instead.
62542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62543   if test "x$has_forbidden_chars" != x; then
62544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62545     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62546   fi
62547 
62548 
62549   windows_path="$new_path"
62550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62551     unix_path=`$CYGPATH -u "$windows_path"`
62552     new_path="$unix_path"
62553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62554     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62555     new_path="$unix_path"
62556   fi
62557 
62558   if test "x$path" != "x$new_path"; then
62559     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62560     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62561 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62562   fi
62563 
62564   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62565   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62566 
62567     else
62568       # We're on a unix platform. Hooray! :)
62569       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62570       has_space=`$ECHO "$path" | $GREP " "`
62571       if test "x$has_space" != x; then
62572         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62573 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62574         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62575       fi
62576 
62577       # Use eval to expand a potential ~
62578       eval path="$path"
62579       if test ! -f "$path" && test ! -d "$path"; then
62580         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62581       fi
62582 
62583       if test -d "$path"; then
62584         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62585       else
62586         dir="`$DIRNAME "$path"`"
62587         base="`$BASENAME "$path"`"
62588         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62589       fi
62590     fi
62591   fi
62592 
62593 
62594   # Only process if variable expands to non-empty
62595 
62596   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62597     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62598 
62599   # Input might be given as Windows format, start by converting to
62600   # unix format.
62601   path="$POTENTIAL_FREETYPE_LIB_PATH"
62602   new_path=`$CYGPATH -u "$path"`
62603 
62604   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62605   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62606   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62607   # "foo.exe" is OK but "foo" is an error.
62608   #
62609   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62610   # It is also a way to make sure we got the proper file name for the real test later on.
62611   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62612   if test "x$test_shortpath" = x; then
62613     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62614 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62615     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62616   fi
62617 
62618   # Call helper function which possibly converts this using DOS-style short mode.
62619   # If so, the updated path is stored in $new_path.
62620 
62621   input_path="$new_path"
62622   # Check if we need to convert this using DOS-style short mode. If the path
62623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62624   # take no chances and rewrite it.
62625   # Note: m4 eats our [], so we need to use [ and ] instead.
62626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62627   if test "x$has_forbidden_chars" != x; then
62628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62629     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62630     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62631     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62632       # Going to short mode and back again did indeed matter. Since short mode is
62633       # case insensitive, let's make it lowercase to improve readability.
62634       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62635       # Now convert it back to Unix-style (cygpath)
62636       input_path=`$CYGPATH -u "$shortmode_path"`
62637       new_path="$input_path"
62638     fi
62639   fi
62640 
62641   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62642   if test "x$test_cygdrive_prefix" = x; then
62643     # As a simple fix, exclude /usr/bin since it's not a real path.
62644     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62645       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62646       # a path prefixed by /cygdrive for fixpath to work.
62647       new_path="$CYGWIN_ROOT_PATH$input_path"
62648     fi
62649   fi
62650 
62651 
62652   if test "x$path" != "x$new_path"; then
62653     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62654     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62655 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62656   fi
62657 
62658     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62659 
62660   path="$POTENTIAL_FREETYPE_LIB_PATH"
62661   has_colon=`$ECHO $path | $GREP ^.:`
62662   new_path="$path"
62663   if test "x$has_colon" = x; then
62664     # Not in mixed or Windows style, start by that.
62665     new_path=`cmd //c echo $path`
62666   fi
62667 
62668 
62669   input_path="$new_path"
62670   # Check if we need to convert this using DOS-style short mode. If the path
62671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62672   # take no chances and rewrite it.
62673   # Note: m4 eats our [], so we need to use [ and ] instead.
62674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62675   if test "x$has_forbidden_chars" != x; then
62676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62677     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62678   fi
62679 
62680 
62681   windows_path="$new_path"
62682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62683     unix_path=`$CYGPATH -u "$windows_path"`
62684     new_path="$unix_path"
62685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62687     new_path="$unix_path"
62688   fi
62689 
62690   if test "x$path" != "x$new_path"; then
62691     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62692     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62693 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62694   fi
62695 
62696   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62697   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62698 
62699     else
62700       # We're on a unix platform. Hooray! :)
62701       path="$POTENTIAL_FREETYPE_LIB_PATH"
62702       has_space=`$ECHO "$path" | $GREP " "`
62703       if test "x$has_space" != x; then
62704         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62705 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62706         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62707       fi
62708 
62709       # Use eval to expand a potential ~
62710       eval path="$path"
62711       if test ! -f "$path" && test ! -d "$path"; then
62712         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62713       fi
62714 
62715       if test -d "$path"; then
62716         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62717       else
62718         dir="`$DIRNAME "$path"`"
62719         base="`$BASENAME "$path"`"
62720         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62721       fi
62722     fi
62723   fi
62724 
62725 
62726     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62727     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62728 $as_echo_n "checking for freetype includes... " >&6; }
62729     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62730 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62731     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62732     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62733 $as_echo_n "checking for freetype libraries... " >&6; }
62734     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62735 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62736   fi
62737 
62738             fi
62739           fi
62740 
62741           if test "x$FOUND_FREETYPE" != xyes; then
62742             FREETYPE_BASE_DIR="$SYSROOT/usr"
62743             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62744 
62745   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62746   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
62747   METHOD="well-known location"
62748 
62749   # Let's start with an optimistic view of the world :-)
62750   FOUND_FREETYPE=yes
62751 
62752   # First look for the canonical freetype main include file ft2build.h.
62753   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62754     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62755     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62756     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62757       # Fail.
62758       FOUND_FREETYPE=no
62759     fi
62760   fi
62761 
62762   if test "x$FOUND_FREETYPE" = xyes; then
62763     # Include file found, let's continue the sanity check.
62764     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62765 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62766 
62767     # Reset to default value
62768     FREETYPE_BASE_NAME=freetype
62769     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62770     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62771       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62772           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62773         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62774         # for the .6 version explicitly.
62775         FREETYPE_BASE_NAME=freetype.6
62776         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62777         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62778 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62779       else
62780         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62781 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62782         FOUND_FREETYPE=no
62783       fi
62784     else
62785       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62786         # On Windows, we will need both .lib and .dll file.
62787         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62788           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62789 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62790           FOUND_FREETYPE=no
62791         fi
62792       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62793           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62794         # Found lib in isa dir, use that instead.
62795         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62796         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62797 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62798       fi
62799     fi
62800   fi
62801 
62802   if test "x$FOUND_FREETYPE" = xyes; then
62803 
62804   # Only process if variable expands to non-empty
62805 
62806   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62807     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62808 
62809   # Input might be given as Windows format, start by converting to
62810   # unix format.
62811   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62812   new_path=`$CYGPATH -u "$path"`
62813 
62814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62817   # "foo.exe" is OK but "foo" is an error.
62818   #
62819   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62820   # It is also a way to make sure we got the proper file name for the real test later on.
62821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62822   if test "x$test_shortpath" = x; then
62823     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62824 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62825     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62826   fi
62827 
62828   # Call helper function which possibly converts this using DOS-style short mode.
62829   # If so, the updated path is stored in $new_path.
62830 
62831   input_path="$new_path"
62832   # Check if we need to convert this using DOS-style short mode. If the path
62833   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62834   # take no chances and rewrite it.
62835   # Note: m4 eats our [], so we need to use [ and ] instead.
62836   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62837   if test "x$has_forbidden_chars" != x; then
62838     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62839     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62840     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62841     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62842       # Going to short mode and back again did indeed matter. Since short mode is
62843       # case insensitive, let's make it lowercase to improve readability.
62844       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62845       # Now convert it back to Unix-style (cygpath)
62846       input_path=`$CYGPATH -u "$shortmode_path"`
62847       new_path="$input_path"
62848     fi
62849   fi
62850 
62851   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62852   if test "x$test_cygdrive_prefix" = x; then
62853     # As a simple fix, exclude /usr/bin since it's not a real path.
62854     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62855       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62856       # a path prefixed by /cygdrive for fixpath to work.
62857       new_path="$CYGWIN_ROOT_PATH$input_path"
62858     fi
62859   fi
62860 
62861 
62862   if test "x$path" != "x$new_path"; then
62863     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62864     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62865 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62866   fi
62867 
62868     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62869 
62870   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62871   has_colon=`$ECHO $path | $GREP ^.:`
62872   new_path="$path"
62873   if test "x$has_colon" = x; then
62874     # Not in mixed or Windows style, start by that.
62875     new_path=`cmd //c echo $path`
62876   fi
62877 
62878 
62879   input_path="$new_path"
62880   # Check if we need to convert this using DOS-style short mode. If the path
62881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62882   # take no chances and rewrite it.
62883   # Note: m4 eats our [], so we need to use [ and ] instead.
62884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62885   if test "x$has_forbidden_chars" != x; then
62886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62887     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62888   fi
62889 
62890 
62891   windows_path="$new_path"
62892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62893     unix_path=`$CYGPATH -u "$windows_path"`
62894     new_path="$unix_path"
62895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62897     new_path="$unix_path"
62898   fi
62899 
62900   if test "x$path" != "x$new_path"; then
62901     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62903 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62904   fi
62905 
62906   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62907   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62908 
62909     else
62910       # We're on a unix platform. Hooray! :)
62911       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62912       has_space=`$ECHO "$path" | $GREP " "`
62913       if test "x$has_space" != x; then
62914         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62915 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62916         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62917       fi
62918 
62919       # Use eval to expand a potential ~
62920       eval path="$path"
62921       if test ! -f "$path" && test ! -d "$path"; then
62922         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62923       fi
62924 
62925       if test -d "$path"; then
62926         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62927       else
62928         dir="`$DIRNAME "$path"`"
62929         base="`$BASENAME "$path"`"
62930         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62931       fi
62932     fi
62933   fi
62934 
62935 
62936   # Only process if variable expands to non-empty
62937 
62938   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62939     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62940 
62941   # Input might be given as Windows format, start by converting to
62942   # unix format.
62943   path="$POTENTIAL_FREETYPE_LIB_PATH"
62944   new_path=`$CYGPATH -u "$path"`
62945 
62946   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62947   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62948   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62949   # "foo.exe" is OK but "foo" is an error.
62950   #
62951   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62952   # It is also a way to make sure we got the proper file name for the real test later on.
62953   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62954   if test "x$test_shortpath" = x; then
62955     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62956 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62957     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62958   fi
62959 
62960   # Call helper function which possibly converts this using DOS-style short mode.
62961   # If so, the updated path is stored in $new_path.
62962 
62963   input_path="$new_path"
62964   # Check if we need to convert this using DOS-style short mode. If the path
62965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62966   # take no chances and rewrite it.
62967   # Note: m4 eats our [], so we need to use [ and ] instead.
62968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62969   if test "x$has_forbidden_chars" != x; then
62970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62971     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62972     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62973     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62974       # Going to short mode and back again did indeed matter. Since short mode is
62975       # case insensitive, let's make it lowercase to improve readability.
62976       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62977       # Now convert it back to Unix-style (cygpath)
62978       input_path=`$CYGPATH -u "$shortmode_path"`
62979       new_path="$input_path"
62980     fi
62981   fi
62982 
62983   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62984   if test "x$test_cygdrive_prefix" = x; then
62985     # As a simple fix, exclude /usr/bin since it's not a real path.
62986     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62987       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62988       # a path prefixed by /cygdrive for fixpath to work.
62989       new_path="$CYGWIN_ROOT_PATH$input_path"
62990     fi
62991   fi
62992 
62993 
62994   if test "x$path" != "x$new_path"; then
62995     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62996     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62997 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62998   fi
62999 
63000     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63001 
63002   path="$POTENTIAL_FREETYPE_LIB_PATH"
63003   has_colon=`$ECHO $path | $GREP ^.:`
63004   new_path="$path"
63005   if test "x$has_colon" = x; then
63006     # Not in mixed or Windows style, start by that.
63007     new_path=`cmd //c echo $path`
63008   fi
63009 
63010 
63011   input_path="$new_path"
63012   # Check if we need to convert this using DOS-style short mode. If the path
63013   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63014   # take no chances and rewrite it.
63015   # Note: m4 eats our [], so we need to use [ and ] instead.
63016   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63017   if test "x$has_forbidden_chars" != x; then
63018     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63019     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63020   fi
63021 
63022 
63023   windows_path="$new_path"
63024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63025     unix_path=`$CYGPATH -u "$windows_path"`
63026     new_path="$unix_path"
63027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63029     new_path="$unix_path"
63030   fi
63031 
63032   if test "x$path" != "x$new_path"; then
63033     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63034     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63035 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63036   fi
63037 
63038   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63039   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63040 
63041     else
63042       # We're on a unix platform. Hooray! :)
63043       path="$POTENTIAL_FREETYPE_LIB_PATH"
63044       has_space=`$ECHO "$path" | $GREP " "`
63045       if test "x$has_space" != x; then
63046         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63047 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63048         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63049       fi
63050 
63051       # Use eval to expand a potential ~
63052       eval path="$path"
63053       if test ! -f "$path" && test ! -d "$path"; then
63054         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63055       fi
63056 
63057       if test -d "$path"; then
63058         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63059       else
63060         dir="`$DIRNAME "$path"`"
63061         base="`$BASENAME "$path"`"
63062         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63063       fi
63064     fi
63065   fi
63066 
63067 
63068     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63070 $as_echo_n "checking for freetype includes... " >&6; }
63071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63072 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63073     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63074     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63075 $as_echo_n "checking for freetype libraries... " >&6; }
63076     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63077 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63078   fi
63079 
63080             else
63081 
63082   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63083   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
63084   METHOD="well-known location"
63085 
63086   # Let's start with an optimistic view of the world :-)
63087   FOUND_FREETYPE=yes
63088 
63089   # First look for the canonical freetype main include file ft2build.h.
63090   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63091     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63092     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63093     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63094       # Fail.
63095       FOUND_FREETYPE=no
63096     fi
63097   fi
63098 
63099   if test "x$FOUND_FREETYPE" = xyes; then
63100     # Include file found, let's continue the sanity check.
63101     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63102 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63103 
63104     # Reset to default value
63105     FREETYPE_BASE_NAME=freetype
63106     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63107     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63108       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63109           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63110         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63111         # for the .6 version explicitly.
63112         FREETYPE_BASE_NAME=freetype.6
63113         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63114         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63115 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63116       else
63117         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63118 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63119         FOUND_FREETYPE=no
63120       fi
63121     else
63122       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63123         # On Windows, we will need both .lib and .dll file.
63124         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63125           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63126 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63127           FOUND_FREETYPE=no
63128         fi
63129       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63130           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63131         # Found lib in isa dir, use that instead.
63132         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63133         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63134 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63135       fi
63136     fi
63137   fi
63138 
63139   if test "x$FOUND_FREETYPE" = xyes; then
63140 
63141   # Only process if variable expands to non-empty
63142 
63143   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63144     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63145 
63146   # Input might be given as Windows format, start by converting to
63147   # unix format.
63148   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63149   new_path=`$CYGPATH -u "$path"`
63150 
63151   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63152   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63153   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63154   # "foo.exe" is OK but "foo" is an error.
63155   #
63156   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63157   # It is also a way to make sure we got the proper file name for the real test later on.
63158   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63159   if test "x$test_shortpath" = x; then
63160     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63161 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63162     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63163   fi
63164 
63165   # Call helper function which possibly converts this using DOS-style short mode.
63166   # If so, the updated path is stored in $new_path.
63167 
63168   input_path="$new_path"
63169   # Check if we need to convert this using DOS-style short mode. If the path
63170   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63171   # take no chances and rewrite it.
63172   # Note: m4 eats our [], so we need to use [ and ] instead.
63173   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63174   if test "x$has_forbidden_chars" != x; then
63175     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63176     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63177     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63178     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63179       # Going to short mode and back again did indeed matter. Since short mode is
63180       # case insensitive, let's make it lowercase to improve readability.
63181       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63182       # Now convert it back to Unix-style (cygpath)
63183       input_path=`$CYGPATH -u "$shortmode_path"`
63184       new_path="$input_path"
63185     fi
63186   fi
63187 
63188   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63189   if test "x$test_cygdrive_prefix" = x; then
63190     # As a simple fix, exclude /usr/bin since it's not a real path.
63191     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63192       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63193       # a path prefixed by /cygdrive for fixpath to work.
63194       new_path="$CYGWIN_ROOT_PATH$input_path"
63195     fi
63196   fi
63197 
63198 
63199   if test "x$path" != "x$new_path"; then
63200     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63201     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63202 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63203   fi
63204 
63205     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63206 
63207   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63208   has_colon=`$ECHO $path | $GREP ^.:`
63209   new_path="$path"
63210   if test "x$has_colon" = x; then
63211     # Not in mixed or Windows style, start by that.
63212     new_path=`cmd //c echo $path`
63213   fi
63214 
63215 
63216   input_path="$new_path"
63217   # Check if we need to convert this using DOS-style short mode. If the path
63218   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63219   # take no chances and rewrite it.
63220   # Note: m4 eats our [], so we need to use [ and ] instead.
63221   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63222   if test "x$has_forbidden_chars" != x; then
63223     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63224     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63225   fi
63226 
63227 
63228   windows_path="$new_path"
63229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63230     unix_path=`$CYGPATH -u "$windows_path"`
63231     new_path="$unix_path"
63232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63234     new_path="$unix_path"
63235   fi
63236 
63237   if test "x$path" != "x$new_path"; then
63238     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63239     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63240 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63241   fi
63242 
63243   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63244   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63245 
63246     else
63247       # We're on a unix platform. Hooray! :)
63248       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63249       has_space=`$ECHO "$path" | $GREP " "`
63250       if test "x$has_space" != x; then
63251         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63252 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63253         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63254       fi
63255 
63256       # Use eval to expand a potential ~
63257       eval path="$path"
63258       if test ! -f "$path" && test ! -d "$path"; then
63259         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63260       fi
63261 
63262       if test -d "$path"; then
63263         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63264       else
63265         dir="`$DIRNAME "$path"`"
63266         base="`$BASENAME "$path"`"
63267         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63268       fi
63269     fi
63270   fi
63271 
63272 
63273   # Only process if variable expands to non-empty
63274 
63275   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63276     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63277 
63278   # Input might be given as Windows format, start by converting to
63279   # unix format.
63280   path="$POTENTIAL_FREETYPE_LIB_PATH"
63281   new_path=`$CYGPATH -u "$path"`
63282 
63283   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63284   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63285   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63286   # "foo.exe" is OK but "foo" is an error.
63287   #
63288   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63289   # It is also a way to make sure we got the proper file name for the real test later on.
63290   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63291   if test "x$test_shortpath" = x; then
63292     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63293 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63294     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63295   fi
63296 
63297   # Call helper function which possibly converts this using DOS-style short mode.
63298   # If so, the updated path is stored in $new_path.
63299 
63300   input_path="$new_path"
63301   # Check if we need to convert this using DOS-style short mode. If the path
63302   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63303   # take no chances and rewrite it.
63304   # Note: m4 eats our [], so we need to use [ and ] instead.
63305   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63306   if test "x$has_forbidden_chars" != x; then
63307     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63308     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63309     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63310     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63311       # Going to short mode and back again did indeed matter. Since short mode is
63312       # case insensitive, let's make it lowercase to improve readability.
63313       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63314       # Now convert it back to Unix-style (cygpath)
63315       input_path=`$CYGPATH -u "$shortmode_path"`
63316       new_path="$input_path"
63317     fi
63318   fi
63319 
63320   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63321   if test "x$test_cygdrive_prefix" = x; then
63322     # As a simple fix, exclude /usr/bin since it's not a real path.
63323     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63324       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63325       # a path prefixed by /cygdrive for fixpath to work.
63326       new_path="$CYGWIN_ROOT_PATH$input_path"
63327     fi
63328   fi
63329 
63330 
63331   if test "x$path" != "x$new_path"; then
63332     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63334 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63335   fi
63336 
63337     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63338 
63339   path="$POTENTIAL_FREETYPE_LIB_PATH"
63340   has_colon=`$ECHO $path | $GREP ^.:`
63341   new_path="$path"
63342   if test "x$has_colon" = x; then
63343     # Not in mixed or Windows style, start by that.
63344     new_path=`cmd //c echo $path`
63345   fi
63346 
63347 
63348   input_path="$new_path"
63349   # Check if we need to convert this using DOS-style short mode. If the path
63350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63351   # take no chances and rewrite it.
63352   # Note: m4 eats our [], so we need to use [ and ] instead.
63353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63354   if test "x$has_forbidden_chars" != x; then
63355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63356     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63357   fi
63358 
63359 
63360   windows_path="$new_path"
63361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63362     unix_path=`$CYGPATH -u "$windows_path"`
63363     new_path="$unix_path"
63364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63366     new_path="$unix_path"
63367   fi
63368 
63369   if test "x$path" != "x$new_path"; then
63370     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63371     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63372 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63373   fi
63374 
63375   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63376   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63377 
63378     else
63379       # We're on a unix platform. Hooray! :)
63380       path="$POTENTIAL_FREETYPE_LIB_PATH"
63381       has_space=`$ECHO "$path" | $GREP " "`
63382       if test "x$has_space" != x; then
63383         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63384 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63385         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63386       fi
63387 
63388       # Use eval to expand a potential ~
63389       eval path="$path"
63390       if test ! -f "$path" && test ! -d "$path"; then
63391         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63392       fi
63393 
63394       if test -d "$path"; then
63395         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63396       else
63397         dir="`$DIRNAME "$path"`"
63398         base="`$BASENAME "$path"`"
63399         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63400       fi
63401     fi
63402   fi
63403 
63404 
63405     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63406     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63407 $as_echo_n "checking for freetype includes... " >&6; }
63408     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63409 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63410     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63411     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63412 $as_echo_n "checking for freetype libraries... " >&6; }
63413     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63414 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63415   fi
63416 
63417               if test "x$FOUND_FREETYPE" != xyes; then
63418 
63419   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63420   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63421   METHOD="well-known location"
63422 
63423   # Let's start with an optimistic view of the world :-)
63424   FOUND_FREETYPE=yes
63425 
63426   # First look for the canonical freetype main include file ft2build.h.
63427   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63428     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63429     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63430     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63431       # Fail.
63432       FOUND_FREETYPE=no
63433     fi
63434   fi
63435 
63436   if test "x$FOUND_FREETYPE" = xyes; then
63437     # Include file found, let's continue the sanity check.
63438     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63439 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63440 
63441     # Reset to default value
63442     FREETYPE_BASE_NAME=freetype
63443     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63444     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63445       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63446           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63447         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63448         # for the .6 version explicitly.
63449         FREETYPE_BASE_NAME=freetype.6
63450         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63451         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63452 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63453       else
63454         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63455 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63456         FOUND_FREETYPE=no
63457       fi
63458     else
63459       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63460         # On Windows, we will need both .lib and .dll file.
63461         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63462           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63463 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63464           FOUND_FREETYPE=no
63465         fi
63466       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63467           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63468         # Found lib in isa dir, use that instead.
63469         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63470         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63471 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63472       fi
63473     fi
63474   fi
63475 
63476   if test "x$FOUND_FREETYPE" = xyes; then
63477 
63478   # Only process if variable expands to non-empty
63479 
63480   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63481     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63482 
63483   # Input might be given as Windows format, start by converting to
63484   # unix format.
63485   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63486   new_path=`$CYGPATH -u "$path"`
63487 
63488   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63489   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63490   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63491   # "foo.exe" is OK but "foo" is an error.
63492   #
63493   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63494   # It is also a way to make sure we got the proper file name for the real test later on.
63495   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63496   if test "x$test_shortpath" = x; then
63497     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63498 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63499     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63500   fi
63501 
63502   # Call helper function which possibly converts this using DOS-style short mode.
63503   # If so, the updated path is stored in $new_path.
63504 
63505   input_path="$new_path"
63506   # Check if we need to convert this using DOS-style short mode. If the path
63507   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63508   # take no chances and rewrite it.
63509   # Note: m4 eats our [], so we need to use [ and ] instead.
63510   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63511   if test "x$has_forbidden_chars" != x; then
63512     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63513     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63514     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63515     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63516       # Going to short mode and back again did indeed matter. Since short mode is
63517       # case insensitive, let's make it lowercase to improve readability.
63518       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63519       # Now convert it back to Unix-style (cygpath)
63520       input_path=`$CYGPATH -u "$shortmode_path"`
63521       new_path="$input_path"
63522     fi
63523   fi
63524 
63525   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63526   if test "x$test_cygdrive_prefix" = x; then
63527     # As a simple fix, exclude /usr/bin since it's not a real path.
63528     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63529       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63530       # a path prefixed by /cygdrive for fixpath to work.
63531       new_path="$CYGWIN_ROOT_PATH$input_path"
63532     fi
63533   fi
63534 
63535 
63536   if test "x$path" != "x$new_path"; then
63537     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63538     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63539 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63540   fi
63541 
63542     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63543 
63544   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63545   has_colon=`$ECHO $path | $GREP ^.:`
63546   new_path="$path"
63547   if test "x$has_colon" = x; then
63548     # Not in mixed or Windows style, start by that.
63549     new_path=`cmd //c echo $path`
63550   fi
63551 
63552 
63553   input_path="$new_path"
63554   # Check if we need to convert this using DOS-style short mode. If the path
63555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63556   # take no chances and rewrite it.
63557   # Note: m4 eats our [], so we need to use [ and ] instead.
63558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63559   if test "x$has_forbidden_chars" != x; then
63560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63561     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63562   fi
63563 
63564 
63565   windows_path="$new_path"
63566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63567     unix_path=`$CYGPATH -u "$windows_path"`
63568     new_path="$unix_path"
63569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63570     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63571     new_path="$unix_path"
63572   fi
63573 
63574   if test "x$path" != "x$new_path"; then
63575     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63576     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63577 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63578   fi
63579 
63580   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63581   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63582 
63583     else
63584       # We're on a unix platform. Hooray! :)
63585       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63586       has_space=`$ECHO "$path" | $GREP " "`
63587       if test "x$has_space" != x; then
63588         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63589 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63590         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63591       fi
63592 
63593       # Use eval to expand a potential ~
63594       eval path="$path"
63595       if test ! -f "$path" && test ! -d "$path"; then
63596         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63597       fi
63598 
63599       if test -d "$path"; then
63600         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63601       else
63602         dir="`$DIRNAME "$path"`"
63603         base="`$BASENAME "$path"`"
63604         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63605       fi
63606     fi
63607   fi
63608 
63609 
63610   # Only process if variable expands to non-empty
63611 
63612   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63613     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63614 
63615   # Input might be given as Windows format, start by converting to
63616   # unix format.
63617   path="$POTENTIAL_FREETYPE_LIB_PATH"
63618   new_path=`$CYGPATH -u "$path"`
63619 
63620   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63621   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63622   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63623   # "foo.exe" is OK but "foo" is an error.
63624   #
63625   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63626   # It is also a way to make sure we got the proper file name for the real test later on.
63627   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63628   if test "x$test_shortpath" = x; then
63629     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63630 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63631     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63632   fi
63633 
63634   # Call helper function which possibly converts this using DOS-style short mode.
63635   # If so, the updated path is stored in $new_path.
63636 
63637   input_path="$new_path"
63638   # Check if we need to convert this using DOS-style short mode. If the path
63639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63640   # take no chances and rewrite it.
63641   # Note: m4 eats our [], so we need to use [ and ] instead.
63642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63643   if test "x$has_forbidden_chars" != x; then
63644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63645     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63646     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63647     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63648       # Going to short mode and back again did indeed matter. Since short mode is
63649       # case insensitive, let's make it lowercase to improve readability.
63650       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63651       # Now convert it back to Unix-style (cygpath)
63652       input_path=`$CYGPATH -u "$shortmode_path"`
63653       new_path="$input_path"
63654     fi
63655   fi
63656 
63657   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63658   if test "x$test_cygdrive_prefix" = x; then
63659     # As a simple fix, exclude /usr/bin since it's not a real path.
63660     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63661       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63662       # a path prefixed by /cygdrive for fixpath to work.
63663       new_path="$CYGWIN_ROOT_PATH$input_path"
63664     fi
63665   fi
63666 
63667 
63668   if test "x$path" != "x$new_path"; then
63669     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63670     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63671 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63672   fi
63673 
63674     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63675 
63676   path="$POTENTIAL_FREETYPE_LIB_PATH"
63677   has_colon=`$ECHO $path | $GREP ^.:`
63678   new_path="$path"
63679   if test "x$has_colon" = x; then
63680     # Not in mixed or Windows style, start by that.
63681     new_path=`cmd //c echo $path`
63682   fi
63683 
63684 
63685   input_path="$new_path"
63686   # Check if we need to convert this using DOS-style short mode. If the path
63687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63688   # take no chances and rewrite it.
63689   # Note: m4 eats our [], so we need to use [ and ] instead.
63690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63691   if test "x$has_forbidden_chars" != x; then
63692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63693     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63694   fi
63695 
63696 
63697   windows_path="$new_path"
63698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63699     unix_path=`$CYGPATH -u "$windows_path"`
63700     new_path="$unix_path"
63701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63703     new_path="$unix_path"
63704   fi
63705 
63706   if test "x$path" != "x$new_path"; then
63707     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63709 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63710   fi
63711 
63712   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63713   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63714 
63715     else
63716       # We're on a unix platform. Hooray! :)
63717       path="$POTENTIAL_FREETYPE_LIB_PATH"
63718       has_space=`$ECHO "$path" | $GREP " "`
63719       if test "x$has_space" != x; then
63720         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63721 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63722         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63723       fi
63724 
63725       # Use eval to expand a potential ~
63726       eval path="$path"
63727       if test ! -f "$path" && test ! -d "$path"; then
63728         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63729       fi
63730 
63731       if test -d "$path"; then
63732         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63733       else
63734         dir="`$DIRNAME "$path"`"
63735         base="`$BASENAME "$path"`"
63736         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63737       fi
63738     fi
63739   fi
63740 
63741 
63742     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63743     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63744 $as_echo_n "checking for freetype includes... " >&6; }
63745     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63746 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63747     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63748     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63749 $as_echo_n "checking for freetype libraries... " >&6; }
63750     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63751 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63752   fi
63753 
63754               fi
63755             fi
63756           fi
63757         fi
63758       fi # end check in well-known locations
63759 
63760       if test "x$FOUND_FREETYPE" != xyes; then
63761 
63762   # Print a helpful message on how to acquire the necessary build dependency.
63763   # freetype is the help tag: freetype, cups, alsa etc
63764   MISSING_DEPENDENCY=freetype
63765 
63766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63767     cygwin_help $MISSING_DEPENDENCY
63768   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63769     msys_help $MISSING_DEPENDENCY
63770   else
63771     PKGHANDLER_COMMAND=
63772 
63773     case $PKGHANDLER in
63774       apt-get)
63775         apt_help     $MISSING_DEPENDENCY ;;
63776       yum)
63777         yum_help     $MISSING_DEPENDENCY ;;
63778       brew)
63779         brew_help    $MISSING_DEPENDENCY ;;
63780       port)
63781         port_help    $MISSING_DEPENDENCY ;;
63782       pkgutil)
63783         pkgutil_help $MISSING_DEPENDENCY ;;
63784       pkgadd)
63785         pkgadd_help  $MISSING_DEPENDENCY ;;
63786     esac
63787 
63788     if test "x$PKGHANDLER_COMMAND" != x; then
63789       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63790     fi
63791   fi
63792 
63793         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63794       fi
63795     fi # end user specified settings
63796 
63797     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63798     if test "x$FREETYPE_CFLAGS" = x; then
63799 
63800   # Only process if variable expands to non-empty
63801 
63802   if test "x$FREETYPE_INCLUDE_PATH" != x; then
63803     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63804 
63805   # Input might be given as Windows format, start by converting to
63806   # unix format.
63807   path="$FREETYPE_INCLUDE_PATH"
63808   new_path=`$CYGPATH -u "$path"`
63809 
63810   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63811   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63812   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63813   # "foo.exe" is OK but "foo" is an error.
63814   #
63815   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63816   # It is also a way to make sure we got the proper file name for the real test later on.
63817   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63818   if test "x$test_shortpath" = x; then
63819     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63820 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63821     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63822   fi
63823 
63824   # Call helper function which possibly converts this using DOS-style short mode.
63825   # If so, the updated path is stored in $new_path.
63826 
63827   input_path="$new_path"
63828   # Check if we need to convert this using DOS-style short mode. If the path
63829   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63830   # take no chances and rewrite it.
63831   # Note: m4 eats our [], so we need to use [ and ] instead.
63832   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63833   if test "x$has_forbidden_chars" != x; then
63834     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63835     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63836     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63837     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63838       # Going to short mode and back again did indeed matter. Since short mode is
63839       # case insensitive, let's make it lowercase to improve readability.
63840       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63841       # Now convert it back to Unix-style (cygpath)
63842       input_path=`$CYGPATH -u "$shortmode_path"`
63843       new_path="$input_path"
63844     fi
63845   fi
63846 
63847   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63848   if test "x$test_cygdrive_prefix" = x; then
63849     # As a simple fix, exclude /usr/bin since it's not a real path.
63850     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63851       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63852       # a path prefixed by /cygdrive for fixpath to work.
63853       new_path="$CYGWIN_ROOT_PATH$input_path"
63854     fi
63855   fi
63856 
63857 
63858   if test "x$path" != "x$new_path"; then
63859     FREETYPE_INCLUDE_PATH="$new_path"
63860     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63861 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63862   fi
63863 
63864     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63865 
63866   path="$FREETYPE_INCLUDE_PATH"
63867   has_colon=`$ECHO $path | $GREP ^.:`
63868   new_path="$path"
63869   if test "x$has_colon" = x; then
63870     # Not in mixed or Windows style, start by that.
63871     new_path=`cmd //c echo $path`
63872   fi
63873 
63874 
63875   input_path="$new_path"
63876   # Check if we need to convert this using DOS-style short mode. If the path
63877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63878   # take no chances and rewrite it.
63879   # Note: m4 eats our [], so we need to use [ and ] instead.
63880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63881   if test "x$has_forbidden_chars" != x; then
63882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63883     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63884   fi
63885 
63886 
63887   windows_path="$new_path"
63888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63889     unix_path=`$CYGPATH -u "$windows_path"`
63890     new_path="$unix_path"
63891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63892     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63893     new_path="$unix_path"
63894   fi
63895 
63896   if test "x$path" != "x$new_path"; then
63897     FREETYPE_INCLUDE_PATH="$new_path"
63898     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63899 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63900   fi
63901 
63902   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63903   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63904 
63905     else
63906       # We're on a unix platform. Hooray! :)
63907       path="$FREETYPE_INCLUDE_PATH"
63908       has_space=`$ECHO "$path" | $GREP " "`
63909       if test "x$has_space" != x; then
63910         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63911 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63912         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63913       fi
63914 
63915       # Use eval to expand a potential ~
63916       eval path="$path"
63917       if test ! -f "$path" && test ! -d "$path"; then
63918         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63919       fi
63920 
63921       if test -d "$path"; then
63922         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63923       else
63924         dir="`$DIRNAME "$path"`"
63925         base="`$BASENAME "$path"`"
63926         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63927       fi
63928     fi
63929   fi
63930 
63931       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63932         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63933       else
63934         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63935       fi
63936     fi
63937 
63938     if test "x$FREETYPE_LIBS" = x; then
63939 
63940   # Only process if variable expands to non-empty
63941 
63942   if test "x$FREETYPE_LIB_PATH" != x; then
63943     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63944 
63945   # Input might be given as Windows format, start by converting to
63946   # unix format.
63947   path="$FREETYPE_LIB_PATH"
63948   new_path=`$CYGPATH -u "$path"`
63949 
63950   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63951   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63952   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63953   # "foo.exe" is OK but "foo" is an error.
63954   #
63955   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63956   # It is also a way to make sure we got the proper file name for the real test later on.
63957   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63958   if test "x$test_shortpath" = x; then
63959     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63960 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63961     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63962   fi
63963 
63964   # Call helper function which possibly converts this using DOS-style short mode.
63965   # If so, the updated path is stored in $new_path.
63966 
63967   input_path="$new_path"
63968   # Check if we need to convert this using DOS-style short mode. If the path
63969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63970   # take no chances and rewrite it.
63971   # Note: m4 eats our [], so we need to use [ and ] instead.
63972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63973   if test "x$has_forbidden_chars" != x; then
63974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63975     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63976     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63977     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63978       # Going to short mode and back again did indeed matter. Since short mode is
63979       # case insensitive, let's make it lowercase to improve readability.
63980       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63981       # Now convert it back to Unix-style (cygpath)
63982       input_path=`$CYGPATH -u "$shortmode_path"`
63983       new_path="$input_path"
63984     fi
63985   fi
63986 
63987   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63988   if test "x$test_cygdrive_prefix" = x; then
63989     # As a simple fix, exclude /usr/bin since it's not a real path.
63990     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63991       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63992       # a path prefixed by /cygdrive for fixpath to work.
63993       new_path="$CYGWIN_ROOT_PATH$input_path"
63994     fi
63995   fi
63996 
63997 
63998   if test "x$path" != "x$new_path"; then
63999     FREETYPE_LIB_PATH="$new_path"
64000     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
64001 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64002   fi
64003 
64004     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64005 
64006   path="$FREETYPE_LIB_PATH"
64007   has_colon=`$ECHO $path | $GREP ^.:`
64008   new_path="$path"
64009   if test "x$has_colon" = x; then
64010     # Not in mixed or Windows style, start by that.
64011     new_path=`cmd //c echo $path`
64012   fi
64013 
64014 
64015   input_path="$new_path"
64016   # Check if we need to convert this using DOS-style short mode. If the path
64017   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64018   # take no chances and rewrite it.
64019   # Note: m4 eats our [], so we need to use [ and ] instead.
64020   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64021   if test "x$has_forbidden_chars" != x; then
64022     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64023     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64024   fi
64025 
64026 
64027   windows_path="$new_path"
64028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64029     unix_path=`$CYGPATH -u "$windows_path"`
64030     new_path="$unix_path"
64031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64033     new_path="$unix_path"
64034   fi
64035 
64036   if test "x$path" != "x$new_path"; then
64037     FREETYPE_LIB_PATH="$new_path"
64038     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
64039 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64040   fi
64041 
64042   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64043   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64044 
64045     else
64046       # We're on a unix platform. Hooray! :)
64047       path="$FREETYPE_LIB_PATH"
64048       has_space=`$ECHO "$path" | $GREP " "`
64049       if test "x$has_space" != x; then
64050         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64051 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64052         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64053       fi
64054 
64055       # Use eval to expand a potential ~
64056       eval path="$path"
64057       if test ! -f "$path" && test ! -d "$path"; then
64058         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64059       fi
64060 
64061       if test -d "$path"; then
64062         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64063       else
64064         dir="`$DIRNAME "$path"`"
64065         base="`$BASENAME "$path"`"
64066         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64067       fi
64068     fi
64069   fi
64070 
64071       if test "x$OPENJDK_TARGET_OS" = xwindows; then
64072         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
64073       else
64074         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
64075       fi
64076     fi
64077 
64078     # Try to compile it
64079     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
64080 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
64081     ac_ext=cpp
64082 ac_cpp='$CXXCPP $CPPFLAGS'
64083 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64084 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64085 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64086 
64087     PREV_CXXCFLAGS="$CXXFLAGS"
64088     PREV_LIBS="$LIBS"
64089     PREV_CXX="$CXX"
64090     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
64091     LIBS="$LIBS $FREETYPE_LIBS"
64092     CXX="$FIXPATH $CXX"
64093     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64094 /* end confdefs.h.  */
64095 
64096           #include<ft2build.h>
64097           #include FT_FREETYPE_H
64098           int main () {
64099             FT_Init_FreeType(NULL);
64100             return 0;
64101           }
64102 
64103 _ACEOF
64104 if ac_fn_cxx_try_link "$LINENO"; then :
64105 
64106           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64107 $as_echo "yes" >&6; }
64108 
64109 else
64110 
64111           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64112 $as_echo "no" >&6; }
64113           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
64114 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
64115           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
64116 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
64117 
64118 
64119   # Print a helpful message on how to acquire the necessary build dependency.
64120   # freetype is the help tag: freetype, cups, alsa etc
64121   MISSING_DEPENDENCY=freetype
64122 
64123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64124     cygwin_help $MISSING_DEPENDENCY
64125   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64126     msys_help $MISSING_DEPENDENCY
64127   else
64128     PKGHANDLER_COMMAND=
64129 
64130     case $PKGHANDLER in
64131       apt-get)
64132         apt_help     $MISSING_DEPENDENCY ;;
64133       yum)
64134         yum_help     $MISSING_DEPENDENCY ;;
64135       brew)
64136         brew_help    $MISSING_DEPENDENCY ;;
64137       port)
64138         port_help    $MISSING_DEPENDENCY ;;
64139       pkgutil)
64140         pkgutil_help $MISSING_DEPENDENCY ;;
64141       pkgadd)
64142         pkgadd_help  $MISSING_DEPENDENCY ;;
64143     esac
64144 
64145     if test "x$PKGHANDLER_COMMAND" != x; then
64146       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64147     fi
64148   fi
64149 
64150 
64151           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
64152 
64153 
64154 fi
64155 rm -f core conftest.err conftest.$ac_objext \
64156     conftest$ac_exeext conftest.$ac_ext
64157     CXXCFLAGS="$PREV_CXXFLAGS"
64158     LIBS="$PREV_LIBS"
64159     CXX="$PREV_CXX"
64160     ac_ext=cpp
64161 ac_cpp='$CXXCPP $CPPFLAGS'
64162 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64163 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64164 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64165 
64166 
64167     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
64168 $as_echo_n "checking if we should bundle freetype... " >&6; }
64169     if test "x$BUNDLE_FREETYPE" = xyes; then
64170       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
64171     fi
64172     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
64173 $as_echo "$BUNDLE_FREETYPE" >&6; }
64174 
64175   fi # end freetype needed
64176 
64177   FREETYPE_LICENSE=""
64178   if test "x$with_freetype_license" = "xyes"; then
64179     as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
64180   elif test "x$with_freetype_license" != "x"; then
64181     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
64182 $as_echo_n "checking for freetype license... " >&6; }
64183     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
64184 $as_echo "$with_freetype_license" >&6; }
64185     FREETYPE_LICENSE="$with_freetype_license"
64186 
64187   # Only process if variable expands to non-empty
64188 
64189   if test "x$FREETYPE_LICENSE" != x; then
64190     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64191 
64192   # Input might be given as Windows format, start by converting to
64193   # unix format.
64194   path="$FREETYPE_LICENSE"
64195   new_path=`$CYGPATH -u "$path"`
64196 
64197   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64198   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64199   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64200   # "foo.exe" is OK but "foo" is an error.
64201   #
64202   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64203   # It is also a way to make sure we got the proper file name for the real test later on.
64204   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64205   if test "x$test_shortpath" = x; then
64206     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64207 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64208     as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
64209   fi
64210 
64211   # Call helper function which possibly converts this using DOS-style short mode.
64212   # If so, the updated path is stored in $new_path.
64213 
64214   input_path="$new_path"
64215   # Check if we need to convert this using DOS-style short mode. If the path
64216   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64217   # take no chances and rewrite it.
64218   # Note: m4 eats our [], so we need to use [ and ] instead.
64219   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64220   if test "x$has_forbidden_chars" != x; then
64221     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64222     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64223     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64224     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64225       # Going to short mode and back again did indeed matter. Since short mode is
64226       # case insensitive, let's make it lowercase to improve readability.
64227       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64228       # Now convert it back to Unix-style (cygpath)
64229       input_path=`$CYGPATH -u "$shortmode_path"`
64230       new_path="$input_path"
64231     fi
64232   fi
64233 
64234   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64235   if test "x$test_cygdrive_prefix" = x; then
64236     # As a simple fix, exclude /usr/bin since it's not a real path.
64237     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64238       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64239       # a path prefixed by /cygdrive for fixpath to work.
64240       new_path="$CYGWIN_ROOT_PATH$input_path"
64241     fi
64242   fi
64243 
64244 
64245   if test "x$path" != "x$new_path"; then
64246     FREETYPE_LICENSE="$new_path"
64247     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64248 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64249   fi
64250 
64251     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64252 
64253   path="$FREETYPE_LICENSE"
64254   has_colon=`$ECHO $path | $GREP ^.:`
64255   new_path="$path"
64256   if test "x$has_colon" = x; then
64257     # Not in mixed or Windows style, start by that.
64258     new_path=`cmd //c echo $path`
64259   fi
64260 
64261 
64262   input_path="$new_path"
64263   # Check if we need to convert this using DOS-style short mode. If the path
64264   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64265   # take no chances and rewrite it.
64266   # Note: m4 eats our [], so we need to use [ and ] instead.
64267   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64268   if test "x$has_forbidden_chars" != x; then
64269     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64270     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64271   fi
64272 
64273 
64274   windows_path="$new_path"
64275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64276     unix_path=`$CYGPATH -u "$windows_path"`
64277     new_path="$unix_path"
64278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64279     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64280     new_path="$unix_path"
64281   fi
64282 
64283   if test "x$path" != "x$new_path"; then
64284     FREETYPE_LICENSE="$new_path"
64285     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64286 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64287   fi
64288 
64289   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64290   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64291 
64292     else
64293       # We're on a unix platform. Hooray! :)
64294       path="$FREETYPE_LICENSE"
64295       has_space=`$ECHO "$path" | $GREP " "`
64296       if test "x$has_space" != x; then
64297         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64298 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64299         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64300       fi
64301 
64302       # Use eval to expand a potential ~
64303       eval path="$path"
64304       if test ! -f "$path" && test ! -d "$path"; then
64305         as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
64306       fi
64307 
64308       if test -d "$path"; then
64309         FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
64310       else
64311         dir="`$DIRNAME "$path"`"
64312         base="`$BASENAME "$path"`"
64313         FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
64314       fi
64315     fi
64316   fi
64317 
64318     if test ! -f "$FREETYPE_LICENSE"; then
64319       as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
64320     fi
64321   fi
64322 
64323 
64324 
64325 
64326 
64327 
64328 
64329 
64330 # Check whether --with-alsa was given.
64331 if test "${with_alsa+set}" = set; then :
64332   withval=$with_alsa;
64333 fi
64334 
64335 
64336 # Check whether --with-alsa-include was given.
64337 if test "${with_alsa_include+set}" = set; then :
64338   withval=$with_alsa_include;
64339 fi
64340 
64341 
64342 # Check whether --with-alsa-lib was given.
64343 if test "${with_alsa_lib+set}" = set; then :
64344   withval=$with_alsa_lib;
64345 fi
64346 
64347 
64348   if test "x$NEEDS_LIB_ALSA" = xfalse; then
64349     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
64350         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
64351         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
64352       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
64353 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
64354     fi
64355     ALSA_CFLAGS=
64356     ALSA_LIBS=
64357   else
64358     ALSA_FOUND=no
64359 
64360     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
64361       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
64362     fi
64363 
64364     if test "x${with_alsa}" != x; then
64365       ALSA_LIBS="-L${with_alsa}/lib -lasound"
64366       ALSA_CFLAGS="-I${with_alsa}/include"
64367       ALSA_FOUND=yes
64368     fi
64369     if test "x${with_alsa_include}" != x; then
64370       ALSA_CFLAGS="-I${with_alsa_include}"
64371       ALSA_FOUND=yes
64372     fi
64373     if test "x${with_alsa_lib}" != x; then
64374       ALSA_LIBS="-L${with_alsa_lib} -lasound"
64375       ALSA_FOUND=yes
64376     fi
64377     # Do not try pkg-config if we have a sysroot set.
64378     if test "x$SYSROOT" = x; then
64379       if test "x$ALSA_FOUND" = xno; then
64380 
64381 pkg_failed=no
64382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64383 $as_echo_n "checking for ALSA... " >&6; }
64384 
64385 if test -n "$ALSA_CFLAGS"; then
64386     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64387  elif test -n "$PKG_CONFIG"; then
64388     if test -n "$PKG_CONFIG" && \
64389     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64390   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64391   ac_status=$?
64392   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64393   test $ac_status = 0; }; then
64394   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64395 else
64396   pkg_failed=yes
64397 fi
64398  else
64399     pkg_failed=untried
64400 fi
64401 if test -n "$ALSA_LIBS"; then
64402     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64403  elif test -n "$PKG_CONFIG"; then
64404     if test -n "$PKG_CONFIG" && \
64405     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64406   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64407   ac_status=$?
64408   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64409   test $ac_status = 0; }; then
64410   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64411 else
64412   pkg_failed=yes
64413 fi
64414  else
64415     pkg_failed=untried
64416 fi
64417 
64418 
64419 
64420 if test $pkg_failed = yes; then
64421 
64422 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64423         _pkg_short_errors_supported=yes
64424 else
64425         _pkg_short_errors_supported=no
64426 fi
64427         if test $_pkg_short_errors_supported = yes; then
64428                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64429         else
64430                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64431         fi
64432         # Put the nasty error message in config.log where it belongs
64433         echo "$ALSA_PKG_ERRORS" >&5
64434 
64435         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64436 $as_echo "no" >&6; }
64437                 ALSA_FOUND=no
64438 elif test $pkg_failed = untried; then
64439         ALSA_FOUND=no
64440 else
64441         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64442         ALSA_LIBS=$pkg_cv_ALSA_LIBS
64443         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64444 $as_echo "yes" >&6; }
64445         ALSA_FOUND=yes
64446 fi
64447       fi
64448     fi
64449     if test "x$ALSA_FOUND" = xno; then
64450       for ac_header in alsa/asoundlib.h
64451 do :
64452   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64453 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64454   cat >>confdefs.h <<_ACEOF
64455 #define HAVE_ALSA_ASOUNDLIB_H 1
64456 _ACEOF
64457 
64458             ALSA_FOUND=yes
64459             ALSA_CFLAGS=-Iignoreme
64460             ALSA_LIBS=-lasound
64461             DEFAULT_ALSA=yes
64462 
64463 else
64464   ALSA_FOUND=no
64465 
64466 fi
64467 
64468 done
64469 
64470     fi
64471     if test "x$ALSA_FOUND" = xno; then
64472 
64473   # Print a helpful message on how to acquire the necessary build dependency.
64474   # alsa is the help tag: freetype, cups, alsa etc
64475   MISSING_DEPENDENCY=alsa
64476 
64477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64478     cygwin_help $MISSING_DEPENDENCY
64479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64480     msys_help $MISSING_DEPENDENCY
64481   else
64482     PKGHANDLER_COMMAND=
64483 
64484     case $PKGHANDLER in
64485       apt-get)
64486         apt_help     $MISSING_DEPENDENCY ;;
64487       yum)
64488         yum_help     $MISSING_DEPENDENCY ;;
64489       brew)
64490         brew_help    $MISSING_DEPENDENCY ;;
64491       port)
64492         port_help    $MISSING_DEPENDENCY ;;
64493       pkgutil)
64494         pkgutil_help $MISSING_DEPENDENCY ;;
64495       pkgadd)
64496         pkgadd_help  $MISSING_DEPENDENCY ;;
64497     esac
64498 
64499     if test "x$PKGHANDLER_COMMAND" != x; then
64500       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64501     fi
64502   fi
64503 
64504       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64505     fi
64506   fi
64507 
64508 
64509 
64510 
64511 
64512 
64513 # Check whether --with-libffi was given.
64514 if test "${with_libffi+set}" = set; then :
64515   withval=$with_libffi;
64516 fi
64517 
64518 
64519 # Check whether --with-libffi-include was given.
64520 if test "${with_libffi_include+set}" = set; then :
64521   withval=$with_libffi_include;
64522 fi
64523 
64524 
64525 # Check whether --with-libffi-lib was given.
64526 if test "${with_libffi_lib+set}" = set; then :
64527   withval=$with_libffi_lib;
64528 fi
64529 
64530   # Check whether --enable-libffi-bundling was given.
64531 if test "${enable_libffi_bundling+set}" = set; then :
64532   enableval=$enable_libffi_bundling;
64533 fi
64534 
64535 
64536   if test "x$NEEDS_LIB_FFI" = xfalse; then
64537     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64538         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64539         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64540       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64541 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64542     fi
64543     LIBFFI_CFLAGS=
64544     LIBFFI_LIBS=
64545   else
64546     LIBFFI_FOUND=no
64547 
64548     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64549       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64550     fi
64551 
64552     if test "x${with_libffi}" != x; then
64553       LIBFFI_LIB_PATH="${with_libffi}/lib"
64554       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64555       LIBFFI_CFLAGS="-I${with_libffi}/include"
64556       LIBFFI_FOUND=yes
64557     fi
64558     if test "x${with_libffi_include}" != x; then
64559       LIBFFI_CFLAGS="-I${with_libffi_include}"
64560       LIBFFI_FOUND=yes
64561     fi
64562     if test "x${with_libffi_lib}" != x; then
64563       LIBFFI_LIB_PATH="${with_libffi_lib}"
64564       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64565       LIBFFI_FOUND=yes
64566     fi
64567     # Do not try pkg-config if we have a sysroot set.
64568     if test "x$SYSROOT" = x; then
64569       if test "x$LIBFFI_FOUND" = xno; then
64570         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64571 
64572 pkg_failed=no
64573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64574 $as_echo_n "checking for LIBFFI... " >&6; }
64575 
64576 if test -n "$LIBFFI_CFLAGS"; then
64577     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64578  elif test -n "$PKG_CONFIG"; then
64579     if test -n "$PKG_CONFIG" && \
64580     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64581   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64582   ac_status=$?
64583   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64584   test $ac_status = 0; }; then
64585   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64586 else
64587   pkg_failed=yes
64588 fi
64589  else
64590     pkg_failed=untried
64591 fi
64592 if test -n "$LIBFFI_LIBS"; then
64593     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64594  elif test -n "$PKG_CONFIG"; then
64595     if test -n "$PKG_CONFIG" && \
64596     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64597   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64598   ac_status=$?
64599   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64600   test $ac_status = 0; }; then
64601   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64602 else
64603   pkg_failed=yes
64604 fi
64605  else
64606     pkg_failed=untried
64607 fi
64608 
64609 
64610 
64611 if test $pkg_failed = yes; then
64612 
64613 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64614         _pkg_short_errors_supported=yes
64615 else
64616         _pkg_short_errors_supported=no
64617 fi
64618         if test $_pkg_short_errors_supported = yes; then
64619                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64620         else
64621                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64622         fi
64623         # Put the nasty error message in config.log where it belongs
64624         echo "$LIBFFI_PKG_ERRORS" >&5
64625 
64626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64627 $as_echo "no" >&6; }
64628                 LIBFFI_FOUND=no
64629 elif test $pkg_failed = untried; then
64630         LIBFFI_FOUND=no
64631 else
64632         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64633         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64634         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64635 $as_echo "yes" >&6; }
64636         LIBFFI_FOUND=yes
64637 fi
64638       fi
64639     fi
64640     if test "x$LIBFFI_FOUND" = xno; then
64641       for ac_header in ffi.h
64642 do :
64643   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64644 if test "x$ac_cv_header_ffi_h" = xyes; then :
64645   cat >>confdefs.h <<_ACEOF
64646 #define HAVE_FFI_H 1
64647 _ACEOF
64648 
64649             LIBFFI_FOUND=yes
64650             LIBFFI_CFLAGS=
64651             LIBFFI_LIBS=-lffi
64652 
64653 else
64654   LIBFFI_FOUND=no
64655 
64656 fi
64657 
64658 done
64659 
64660     fi
64661     if test "x$LIBFFI_FOUND" = xno; then
64662 
64663   # Print a helpful message on how to acquire the necessary build dependency.
64664   # ffi is the help tag: freetype, cups, alsa etc
64665   MISSING_DEPENDENCY=ffi
64666 
64667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64668     cygwin_help $MISSING_DEPENDENCY
64669   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64670     msys_help $MISSING_DEPENDENCY
64671   else
64672     PKGHANDLER_COMMAND=
64673 
64674     case $PKGHANDLER in
64675       apt-get)
64676         apt_help     $MISSING_DEPENDENCY ;;
64677       yum)
64678         yum_help     $MISSING_DEPENDENCY ;;
64679       brew)
64680         brew_help    $MISSING_DEPENDENCY ;;
64681       port)
64682         port_help    $MISSING_DEPENDENCY ;;
64683       pkgutil)
64684         pkgutil_help $MISSING_DEPENDENCY ;;
64685       pkgadd)
64686         pkgadd_help  $MISSING_DEPENDENCY ;;
64687     esac
64688 
64689     if test "x$PKGHANDLER_COMMAND" != x; then
64690       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64691     fi
64692   fi
64693 
64694       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64695     fi
64696 
64697     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64698 $as_echo_n "checking if libffi works... " >&6; }
64699     ac_ext=c
64700 ac_cpp='$CPP $CPPFLAGS'
64701 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64702 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64703 ac_compiler_gnu=$ac_cv_c_compiler_gnu
64704 
64705     OLD_CFLAGS="$CFLAGS"
64706     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64707     OLD_LIBS="$LIBS"
64708     LIBS="$LIBS $LIBFFI_LIBS"
64709     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64710 /* end confdefs.h.  */
64711 #include <ffi.h>
64712 int
64713 main ()
64714 {
64715 
64716           ffi_call(NULL, NULL, NULL, NULL);
64717           return 0;
64718 
64719   ;
64720   return 0;
64721 }
64722 _ACEOF
64723 if ac_fn_c_try_link "$LINENO"; then :
64724   LIBFFI_WORKS=yes
64725 else
64726   LIBFFI_WORKS=no
64727 
64728 fi
64729 rm -f core conftest.err conftest.$ac_objext \
64730     conftest$ac_exeext conftest.$ac_ext
64731     CFLAGS="$OLD_CFLAGS"
64732     LIBS="$OLD_LIBS"
64733     ac_ext=cpp
64734 ac_cpp='$CXXCPP $CPPFLAGS'
64735 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64736 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64737 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64738 
64739     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64740 $as_echo "$LIBFFI_WORKS" >&6; }
64741 
64742     if test "x$LIBFFI_WORKS" = xno; then
64743 
64744   # Print a helpful message on how to acquire the necessary build dependency.
64745   # ffi is the help tag: freetype, cups, alsa etc
64746   MISSING_DEPENDENCY=ffi
64747 
64748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64749     cygwin_help $MISSING_DEPENDENCY
64750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64751     msys_help $MISSING_DEPENDENCY
64752   else
64753     PKGHANDLER_COMMAND=
64754 
64755     case $PKGHANDLER in
64756       apt-get)
64757         apt_help     $MISSING_DEPENDENCY ;;
64758       yum)
64759         yum_help     $MISSING_DEPENDENCY ;;
64760       brew)
64761         brew_help    $MISSING_DEPENDENCY ;;
64762       port)
64763         port_help    $MISSING_DEPENDENCY ;;
64764       pkgutil)
64765         pkgutil_help $MISSING_DEPENDENCY ;;
64766       pkgadd)
64767         pkgadd_help  $MISSING_DEPENDENCY ;;
64768     esac
64769 
64770     if test "x$PKGHANDLER_COMMAND" != x; then
64771       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64772     fi
64773   fi
64774 
64775       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64776     fi
64777 
64778     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64779 $as_echo_n "checking if libffi should be bundled... " >&6; }
64780     if test "x$enable_libffi_bundling" = "x"; then
64781       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64782 $as_echo "no" >&6; }
64783       ENABLE_LIBFFI_BUNDLING=false
64784     elif  test "x$enable_libffi_bundling" = "xno"; then
64785       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64786 $as_echo "no, forced" >&6; }
64787       ENABLE_LIBFFI_BUNDLING=false
64788     elif  test "x$enable_libffi_bundling" = "xyes"; then
64789       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64790 $as_echo "yes, forced" >&6; }
64791       ENABLE_LIBFFI_BUNDLING=true
64792     else
64793       as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64794     fi
64795 
64796     # Find the libffi.so.X to bundle
64797     if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64798       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64799 $as_echo_n "checking for libffi lib file location... " >&6; }
64800       if test "x${LIBFFI_LIB_PATH}" != x; then
64801         if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64802           LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64803         else
64804           as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64805         fi
64806       else
64807         # If we don't have an explicit path, look in a few obvious places
64808         if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64809           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64810             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64811           elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64812             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64813           else
64814             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64815           fi
64816         elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64817           if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64818             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64819           elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64820             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64821           else
64822             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64823           fi
64824         else
64825           # Fallback on the default /usr/lib dir
64826           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64827             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64828           else
64829             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64830           fi
64831         fi
64832       fi
64833       # Make sure the wildcard is evaluated
64834       LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64835       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64836 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
64837     fi
64838   fi
64839 
64840 
64841 
64842 
64843 
64844 
64845 
64846   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64847     # Extract the first word of "llvm-config", so it can be a program name with args.
64848 set dummy llvm-config; ac_word=$2
64849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64850 $as_echo_n "checking for $ac_word... " >&6; }
64851 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64852   $as_echo_n "(cached) " >&6
64853 else
64854   if test -n "$LLVM_CONFIG"; then
64855   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64856 else
64857 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64858 for as_dir in $PATH
64859 do
64860   IFS=$as_save_IFS
64861   test -z "$as_dir" && as_dir=.
64862     for ac_exec_ext in '' $ac_executable_extensions; do
64863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64864     ac_cv_prog_LLVM_CONFIG="llvm-config"
64865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64866     break 2
64867   fi
64868 done
64869   done
64870 IFS=$as_save_IFS
64871 
64872 fi
64873 fi
64874 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64875 if test -n "$LLVM_CONFIG"; then
64876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64877 $as_echo "$LLVM_CONFIG" >&6; }
64878 else
64879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64880 $as_echo "no" >&6; }
64881 fi
64882 
64883 
64884 
64885     if test "x$LLVM_CONFIG" != xllvm-config; then
64886       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64887     fi
64888 
64889     llvm_components="jit mcjit engine nativecodegen native"
64890     unset LLVM_CFLAGS
64891     for flag in $("$LLVM_CONFIG" --cxxflags); do
64892       if echo "${flag}" | grep -q '^-[ID]'; then
64893         if test "${flag}" != "-D_DEBUG" ; then
64894           if test "${LLVM_CFLAGS}" != "" ; then
64895             LLVM_CFLAGS="${LLVM_CFLAGS} "
64896           fi
64897           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64898         fi
64899       fi
64900     done
64901     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64902     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64903 
64904     unset LLVM_LDFLAGS
64905     for flag in $("${LLVM_CONFIG}" --ldflags); do
64906       if echo "${flag}" | grep -q '^-L'; then
64907         if test "${LLVM_LDFLAGS}" != ""; then
64908           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64909         fi
64910         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64911       fi
64912     done
64913 
64914     unset LLVM_LIBS
64915     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64916       if echo "${flag}" | grep -q '^-l'; then
64917         if test "${LLVM_LIBS}" != ""; then
64918           LLVM_LIBS="${LLVM_LIBS} "
64919         fi
64920         LLVM_LIBS="${LLVM_LIBS}${flag}"
64921       fi
64922     done
64923 
64924     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64925     # always properly detect -ltinfo
64926     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64927 
64928 
64929 
64930 
64931   fi
64932 
64933 
64934 
64935 # Check whether --with-libjpeg was given.
64936 if test "${with_libjpeg+set}" = set; then :
64937   withval=$with_libjpeg;
64938 fi
64939 
64940 
64941   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64942 $as_echo_n "checking for which libjpeg to use... " >&6; }
64943   # default is bundled
64944   DEFAULT_LIBJPEG=bundled
64945   # if user didn't specify, use DEFAULT_LIBJPEG
64946   if test "x${with_libjpeg}" = "x"; then
64947     with_libjpeg=${DEFAULT_LIBJPEG}
64948   fi
64949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64950 $as_echo "${with_libjpeg}" >&6; }
64951 
64952   if test "x${with_libjpeg}" = "xbundled"; then
64953     USE_EXTERNAL_LIBJPEG=false
64954   elif test "x${with_libjpeg}" = "xsystem"; then
64955     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64956 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64957 
64958 else
64959    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64960 fi
64961 
64962 
64963     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64964 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64965 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64966   $as_echo_n "(cached) " >&6
64967 else
64968   ac_check_lib_save_LIBS=$LIBS
64969 LIBS="-ljpeg  $LIBS"
64970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64971 /* end confdefs.h.  */
64972 
64973 /* Override any GCC internal prototype to avoid an error.
64974    Use char because int might match the return type of a GCC
64975    builtin and then its argument prototype would still apply.  */
64976 #ifdef __cplusplus
64977 extern "C"
64978 #endif
64979 char jpeg_CreateDecompress ();
64980 int
64981 main ()
64982 {
64983 return jpeg_CreateDecompress ();
64984   ;
64985   return 0;
64986 }
64987 _ACEOF
64988 if ac_fn_cxx_try_link "$LINENO"; then :
64989   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64990 else
64991   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64992 fi
64993 rm -f core conftest.err conftest.$ac_objext \
64994     conftest$ac_exeext conftest.$ac_ext
64995 LIBS=$ac_check_lib_save_LIBS
64996 fi
64997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64998 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64999 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
65000   cat >>confdefs.h <<_ACEOF
65001 #define HAVE_LIBJPEG 1
65002 _ACEOF
65003 
65004   LIBS="-ljpeg $LIBS"
65005 
65006 else
65007    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
65008 fi
65009 
65010 
65011     USE_EXTERNAL_LIBJPEG=true
65012   else
65013     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
65014   fi
65015 
65016 
65017 
65018 
65019 
65020 # Check whether --with-giflib was given.
65021 if test "${with_giflib+set}" = set; then :
65022   withval=$with_giflib;
65023 fi
65024 
65025 
65026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
65027 $as_echo_n "checking for which giflib to use... " >&6; }
65028   # default is bundled
65029   DEFAULT_GIFLIB=bundled
65030   # if user didn't specify, use DEFAULT_GIFLIB
65031   if test "x${with_giflib}" = "x"; then
65032     with_giflib=${DEFAULT_GIFLIB}
65033   fi
65034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
65035 $as_echo "${with_giflib}" >&6; }
65036 
65037   if test "x${with_giflib}" = "xbundled"; then
65038     USE_EXTERNAL_LIBGIF=false
65039   elif test "x${with_giflib}" = "xsystem"; then
65040     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
65041 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
65042 
65043 else
65044    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
65045 fi
65046 
65047 
65048     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
65049 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
65050 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
65051   $as_echo_n "(cached) " >&6
65052 else
65053   ac_check_lib_save_LIBS=$LIBS
65054 LIBS="-lgif  $LIBS"
65055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65056 /* end confdefs.h.  */
65057 
65058 /* Override any GCC internal prototype to avoid an error.
65059    Use char because int might match the return type of a GCC
65060    builtin and then its argument prototype would still apply.  */
65061 #ifdef __cplusplus
65062 extern "C"
65063 #endif
65064 char DGifGetCode ();
65065 int
65066 main ()
65067 {
65068 return DGifGetCode ();
65069   ;
65070   return 0;
65071 }
65072 _ACEOF
65073 if ac_fn_cxx_try_link "$LINENO"; then :
65074   ac_cv_lib_gif_DGifGetCode=yes
65075 else
65076   ac_cv_lib_gif_DGifGetCode=no
65077 fi
65078 rm -f core conftest.err conftest.$ac_objext \
65079     conftest$ac_exeext conftest.$ac_ext
65080 LIBS=$ac_check_lib_save_LIBS
65081 fi
65082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
65083 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
65084 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
65085   cat >>confdefs.h <<_ACEOF
65086 #define HAVE_LIBGIF 1
65087 _ACEOF
65088 
65089   LIBS="-lgif $LIBS"
65090 
65091 else
65092    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
65093 fi
65094 
65095 
65096     USE_EXTERNAL_LIBGIF=true
65097   else
65098     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
65099   fi
65100 
65101 
65102 
65103 
65104 
65105 # Check whether --with-libpng was given.
65106 if test "${with_libpng+set}" = set; then :
65107   withval=$with_libpng;
65108 fi
65109 
65110 
65111   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
65112 $as_echo_n "checking for which libpng to use... " >&6; }
65113 
65114   # default is bundled
65115   DEFAULT_LIBPNG=bundled
65116   # if user didn't specify, use DEFAULT_LIBPNG
65117   if test "x${with_libpng}" = "x"; then
65118     with_libpng=${DEFAULT_LIBPNG}
65119   fi
65120 
65121   if test "x${with_libpng}" = "xbundled"; then
65122     USE_EXTERNAL_LIBPNG=false
65123     PNG_CFLAGS=""
65124     PNG_LIBS=""
65125     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65126 $as_echo "bundled" >&6; }
65127   elif test "x${with_libpng}" = "xsystem"; then
65128 
65129 pkg_failed=no
65130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
65131 $as_echo_n "checking for PNG... " >&6; }
65132 
65133 if test -n "$PNG_CFLAGS"; then
65134     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
65135  elif test -n "$PKG_CONFIG"; then
65136     if test -n "$PKG_CONFIG" && \
65137     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65138   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65139   ac_status=$?
65140   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65141   test $ac_status = 0; }; then
65142   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
65143 else
65144   pkg_failed=yes
65145 fi
65146  else
65147     pkg_failed=untried
65148 fi
65149 if test -n "$PNG_LIBS"; then
65150     pkg_cv_PNG_LIBS="$PNG_LIBS"
65151  elif test -n "$PKG_CONFIG"; then
65152     if test -n "$PKG_CONFIG" && \
65153     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65154   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65155   ac_status=$?
65156   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65157   test $ac_status = 0; }; then
65158   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
65159 else
65160   pkg_failed=yes
65161 fi
65162  else
65163     pkg_failed=untried
65164 fi
65165 
65166 
65167 
65168 if test $pkg_failed = yes; then
65169 
65170 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65171         _pkg_short_errors_supported=yes
65172 else
65173         _pkg_short_errors_supported=no
65174 fi
65175         if test $_pkg_short_errors_supported = yes; then
65176                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
65177         else
65178                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
65179         fi
65180         # Put the nasty error message in config.log where it belongs
65181         echo "$PNG_PKG_ERRORS" >&5
65182 
65183         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65184 $as_echo "no" >&6; }
65185                 LIBPNG_FOUND=no
65186 elif test $pkg_failed = untried; then
65187         LIBPNG_FOUND=no
65188 else
65189         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
65190         PNG_LIBS=$pkg_cv_PNG_LIBS
65191         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65192 $as_echo "yes" >&6; }
65193         LIBPNG_FOUND=yes
65194 fi
65195     if test "x${LIBPNG_FOUND}" = "xyes"; then
65196       # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
65197       USE_EXTERNAL_LIBPNG=true
65198       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65199 $as_echo "system" >&6; }
65200     else
65201       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65202 $as_echo "system not found" >&6; }
65203       as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
65204     fi
65205   else
65206     as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
65207   fi
65208 
65209 
65210 
65211 
65212 
65213 
65214 
65215 # Check whether --with-zlib was given.
65216 if test "${with_zlib+set}" = set; then :
65217   withval=$with_zlib;
65218 fi
65219 
65220 
65221   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
65222 $as_echo_n "checking for compress in -lz... " >&6; }
65223 if ${ac_cv_lib_z_compress+:} false; then :
65224   $as_echo_n "(cached) " >&6
65225 else
65226   ac_check_lib_save_LIBS=$LIBS
65227 LIBS="-lz  $LIBS"
65228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65229 /* end confdefs.h.  */
65230 
65231 /* Override any GCC internal prototype to avoid an error.
65232    Use char because int might match the return type of a GCC
65233    builtin and then its argument prototype would still apply.  */
65234 #ifdef __cplusplus
65235 extern "C"
65236 #endif
65237 char compress ();
65238 int
65239 main ()
65240 {
65241 return compress ();
65242   ;
65243   return 0;
65244 }
65245 _ACEOF
65246 if ac_fn_cxx_try_link "$LINENO"; then :
65247   ac_cv_lib_z_compress=yes
65248 else
65249   ac_cv_lib_z_compress=no
65250 fi
65251 rm -f core conftest.err conftest.$ac_objext \
65252     conftest$ac_exeext conftest.$ac_ext
65253 LIBS=$ac_check_lib_save_LIBS
65254 fi
65255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
65256 $as_echo "$ac_cv_lib_z_compress" >&6; }
65257 if test "x$ac_cv_lib_z_compress" = xyes; then :
65258    ZLIB_FOUND=yes
65259 else
65260    ZLIB_FOUND=no
65261 fi
65262 
65263 
65264   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
65265 $as_echo_n "checking for which zlib to use... " >&6; }
65266 
65267   DEFAULT_ZLIB=system
65268   if test "x$OPENJDK_TARGET_OS" = xwindows; then
65269     # On windows default is bundled...on others default is system
65270     DEFAULT_ZLIB=bundled
65271   fi
65272 
65273   if test "x${ZLIB_FOUND}" != "xyes"; then
65274     # If we don't find any system...set default to bundled
65275     DEFAULT_ZLIB=bundled
65276   fi
65277 
65278   # If user didn't specify, use DEFAULT_ZLIB
65279   if test "x${with_zlib}" = "x"; then
65280     with_zlib=${DEFAULT_ZLIB}
65281   fi
65282 
65283   if test "x${with_zlib}" = "xbundled"; then
65284     USE_EXTERNAL_LIBZ=false
65285     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65286 $as_echo "bundled" >&6; }
65287   elif test "x${with_zlib}" = "xsystem"; then
65288     if test "x${ZLIB_FOUND}" = "xyes"; then
65289       USE_EXTERNAL_LIBZ=true
65290       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65291 $as_echo "system" >&6; }
65292     else
65293       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65294 $as_echo "system not found" >&6; }
65295       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
65296     fi
65297   else
65298     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
65299   fi
65300 
65301 
65302 
65303 
65304 
65305 # Check whether --with-lcms was given.
65306 if test "${with_lcms+set}" = set; then :
65307   withval=$with_lcms;
65308 fi
65309 
65310 
65311   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
65312 $as_echo_n "checking for which lcms to use... " >&6; }
65313 
65314   DEFAULT_LCMS=bundled
65315   # If user didn't specify, use DEFAULT_LCMS
65316   if test "x${with_lcms}" = "x"; then
65317     with_lcms=${DEFAULT_LCMS}
65318   fi
65319 
65320   if test "x${with_lcms}" = "xbundled"; then
65321     USE_EXTERNAL_LCMS=false
65322     LCMS_CFLAGS=""
65323     LCMS_LIBS=""
65324     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65325 $as_echo "bundled" >&6; }
65326   elif test "x${with_lcms}" = "xsystem"; then
65327     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65328 $as_echo "system" >&6; }
65329 
65330 pkg_failed=no
65331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
65332 $as_echo_n "checking for LCMS... " >&6; }
65333 
65334 if test -n "$LCMS_CFLAGS"; then
65335     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
65336  elif test -n "$PKG_CONFIG"; then
65337     if test -n "$PKG_CONFIG" && \
65338     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65339   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65340   ac_status=$?
65341   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65342   test $ac_status = 0; }; then
65343   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
65344 else
65345   pkg_failed=yes
65346 fi
65347  else
65348     pkg_failed=untried
65349 fi
65350 if test -n "$LCMS_LIBS"; then
65351     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
65352  elif test -n "$PKG_CONFIG"; then
65353     if test -n "$PKG_CONFIG" && \
65354     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65355   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65356   ac_status=$?
65357   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65358   test $ac_status = 0; }; then
65359   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
65360 else
65361   pkg_failed=yes
65362 fi
65363  else
65364     pkg_failed=untried
65365 fi
65366 
65367 
65368 
65369 if test $pkg_failed = yes; then
65370 
65371 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65372         _pkg_short_errors_supported=yes
65373 else
65374         _pkg_short_errors_supported=no
65375 fi
65376         if test $_pkg_short_errors_supported = yes; then
65377                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65378         else
65379                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65380         fi
65381         # Put the nasty error message in config.log where it belongs
65382         echo "$LCMS_PKG_ERRORS" >&5
65383 
65384         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65385 $as_echo "no" >&6; }
65386                 LCMS_FOUND=no
65387 elif test $pkg_failed = untried; then
65388         LCMS_FOUND=no
65389 else
65390         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65391         LCMS_LIBS=$pkg_cv_LCMS_LIBS
65392         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65393 $as_echo "yes" >&6; }
65394         LCMS_FOUND=yes
65395 fi
65396     if test "x${LCMS_FOUND}" = "xyes"; then
65397       # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65398       USE_EXTERNAL_LCMS=true
65399     else
65400       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65401     fi
65402   else
65403     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65404   fi
65405 
65406 
65407 
65408 
65409 
65410 
65411 
65412 
65413 
65414 
65415 
65416 
65417 
65418   # Setup libm (the maths library)
65419   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65420     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65421 $as_echo_n "checking for cos in -lm... " >&6; }
65422 if ${ac_cv_lib_m_cos+:} false; then :
65423   $as_echo_n "(cached) " >&6
65424 else
65425   ac_check_lib_save_LIBS=$LIBS
65426 LIBS="-lm  $LIBS"
65427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65428 /* end confdefs.h.  */
65429 
65430 /* Override any GCC internal prototype to avoid an error.
65431    Use char because int might match the return type of a GCC
65432    builtin and then its argument prototype would still apply.  */
65433 #ifdef __cplusplus
65434 extern "C"
65435 #endif
65436 char cos ();
65437 int
65438 main ()
65439 {
65440 return cos ();
65441   ;
65442   return 0;
65443 }
65444 _ACEOF
65445 if ac_fn_cxx_try_link "$LINENO"; then :
65446   ac_cv_lib_m_cos=yes
65447 else
65448   ac_cv_lib_m_cos=no
65449 fi
65450 rm -f core conftest.err conftest.$ac_objext \
65451     conftest$ac_exeext conftest.$ac_ext
65452 LIBS=$ac_check_lib_save_LIBS
65453 fi
65454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65455 $as_echo "$ac_cv_lib_m_cos" >&6; }
65456 if test "x$ac_cv_lib_m_cos" = xyes; then :
65457   cat >>confdefs.h <<_ACEOF
65458 #define HAVE_LIBM 1
65459 _ACEOF
65460 
65461   LIBS="-lm $LIBS"
65462 
65463 else
65464 
65465         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65466 $as_echo "$as_me: Maths library was not found" >&6;}
65467 
65468 fi
65469 
65470     LIBM="-lm"
65471   else
65472     LIBM=""
65473   fi
65474 
65475 
65476   # Setup libdl (for dynamic library loading)
65477   save_LIBS="$LIBS"
65478   LIBS=""
65479   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65480 $as_echo_n "checking for dlopen in -ldl... " >&6; }
65481 if ${ac_cv_lib_dl_dlopen+:} false; then :
65482   $as_echo_n "(cached) " >&6
65483 else
65484   ac_check_lib_save_LIBS=$LIBS
65485 LIBS="-ldl  $LIBS"
65486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65487 /* end confdefs.h.  */
65488 
65489 /* Override any GCC internal prototype to avoid an error.
65490    Use char because int might match the return type of a GCC
65491    builtin and then its argument prototype would still apply.  */
65492 #ifdef __cplusplus
65493 extern "C"
65494 #endif
65495 char dlopen ();
65496 int
65497 main ()
65498 {
65499 return dlopen ();
65500   ;
65501   return 0;
65502 }
65503 _ACEOF
65504 if ac_fn_cxx_try_link "$LINENO"; then :
65505   ac_cv_lib_dl_dlopen=yes
65506 else
65507   ac_cv_lib_dl_dlopen=no
65508 fi
65509 rm -f core conftest.err conftest.$ac_objext \
65510     conftest$ac_exeext conftest.$ac_ext
65511 LIBS=$ac_check_lib_save_LIBS
65512 fi
65513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65514 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65515 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65516   cat >>confdefs.h <<_ACEOF
65517 #define HAVE_LIBDL 1
65518 _ACEOF
65519 
65520   LIBS="-ldl $LIBS"
65521 
65522 fi
65523 
65524   LIBDL="$LIBS"
65525 
65526   LIBS="$save_LIBS"
65527 
65528   # Deprecated libraries, keep the flags for backwards compatibility
65529   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65530 
65531 
65532 # Check whether --with-dxsdk was given.
65533 if test "${with_dxsdk+set}" = set; then :
65534   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65535 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65536 fi
65537 
65538 
65539 
65540 
65541 # Check whether --with-dxsdk-lib was given.
65542 if test "${with_dxsdk_lib+set}" = set; then :
65543   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65544 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65545 fi
65546 
65547 
65548 
65549 
65550 # Check whether --with-dxsdk-include was given.
65551 if test "${with_dxsdk_include+set}" = set; then :
65552   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65553 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65554 fi
65555 
65556 
65557   fi
65558 
65559   # Control if libzip can use mmap. Available for purposes of overriding.
65560   LIBZIP_CAN_USE_MMAP=true
65561 
65562 
65563 
65564   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65565     # Find the root of the Solaris Studio installation from the compiler path
65566     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65567     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65568     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65569 $as_echo_n "checking for libstlport.so.1... " >&6; }
65570     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65571       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65572       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65573     fi
65574     if test -f "$STLPORT_LIB"; then
65575       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65576 $as_echo "yes, $STLPORT_LIB" >&6; }
65577 
65578   # Only process if variable expands to non-empty
65579 
65580   if test "x$STLPORT_LIB" != x; then
65581     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65582 
65583   # Input might be given as Windows format, start by converting to
65584   # unix format.
65585   path="$STLPORT_LIB"
65586   new_path=`$CYGPATH -u "$path"`
65587 
65588   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65589   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65590   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65591   # "foo.exe" is OK but "foo" is an error.
65592   #
65593   # This test is therefore slightly more accurate than "test -f" to check for file precense.
65594   # It is also a way to make sure we got the proper file name for the real test later on.
65595   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65596   if test "x$test_shortpath" = x; then
65597     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65598 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65599     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65600   fi
65601 
65602   # Call helper function which possibly converts this using DOS-style short mode.
65603   # If so, the updated path is stored in $new_path.
65604 
65605   input_path="$new_path"
65606   # Check if we need to convert this using DOS-style short mode. If the path
65607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65608   # take no chances and rewrite it.
65609   # Note: m4 eats our [], so we need to use [ and ] instead.
65610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65611   if test "x$has_forbidden_chars" != x; then
65612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65613     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65614     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65615     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65616       # Going to short mode and back again did indeed matter. Since short mode is
65617       # case insensitive, let's make it lowercase to improve readability.
65618       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65619       # Now convert it back to Unix-style (cygpath)
65620       input_path=`$CYGPATH -u "$shortmode_path"`
65621       new_path="$input_path"
65622     fi
65623   fi
65624 
65625   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65626   if test "x$test_cygdrive_prefix" = x; then
65627     # As a simple fix, exclude /usr/bin since it's not a real path.
65628     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65629       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65630       # a path prefixed by /cygdrive for fixpath to work.
65631       new_path="$CYGWIN_ROOT_PATH$input_path"
65632     fi
65633   fi
65634 
65635 
65636   if test "x$path" != "x$new_path"; then
65637     STLPORT_LIB="$new_path"
65638     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65639 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65640   fi
65641 
65642     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65643 
65644   path="$STLPORT_LIB"
65645   has_colon=`$ECHO $path | $GREP ^.:`
65646   new_path="$path"
65647   if test "x$has_colon" = x; then
65648     # Not in mixed or Windows style, start by that.
65649     new_path=`cmd //c echo $path`
65650   fi
65651 
65652 
65653   input_path="$new_path"
65654   # Check if we need to convert this using DOS-style short mode. If the path
65655   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65656   # take no chances and rewrite it.
65657   # Note: m4 eats our [], so we need to use [ and ] instead.
65658   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65659   if test "x$has_forbidden_chars" != x; then
65660     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65661     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65662   fi
65663 
65664 
65665   windows_path="$new_path"
65666   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65667     unix_path=`$CYGPATH -u "$windows_path"`
65668     new_path="$unix_path"
65669   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65670     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65671     new_path="$unix_path"
65672   fi
65673 
65674   if test "x$path" != "x$new_path"; then
65675     STLPORT_LIB="$new_path"
65676     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65677 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65678   fi
65679 
65680   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65681   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65682 
65683     else
65684       # We're on a unix platform. Hooray! :)
65685       path="$STLPORT_LIB"
65686       has_space=`$ECHO "$path" | $GREP " "`
65687       if test "x$has_space" != x; then
65688         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65689 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65690         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65691       fi
65692 
65693       # Use eval to expand a potential ~
65694       eval path="$path"
65695       if test ! -f "$path" && test ! -d "$path"; then
65696         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65697       fi
65698 
65699       if test -d "$path"; then
65700         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65701       else
65702         dir="`$DIRNAME "$path"`"
65703         base="`$BASENAME "$path"`"
65704         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65705       fi
65706     fi
65707   fi
65708 
65709     else
65710       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65711 $as_echo "no, not found at $STLPORT_LIB" >&6; }
65712       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65713     fi
65714 
65715   fi
65716 
65717 
65718 
65719 
65720 
65721 
65722 
65723 
65724 
65725 
65726 
65727 
65728 
65729 
65730 # Hotspot setup depends on lib checks.
65731 
65732 
65733   # The user can in some cases supply additional jvm features. For the custom
65734   # variant, this defines the entire variant.
65735 
65736 # Check whether --with-jvm-features was given.
65737 if test "${with_jvm_features+set}" = set; then :
65738   withval=$with_jvm_features;
65739 fi
65740 
65741   if test "x$with_jvm_features" != x; then
65742     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65743 $as_echo_n "checking additional JVM features... " >&6; }
65744     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65745     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65746 $as_echo "$JVM_FEATURES" >&6; }
65747   fi
65748 
65749   # Override hotspot cpu definitions for ARM platforms
65750   if test "x$OPENJDK_TARGET_CPU" = xarm; then
65751     HOTSPOT_TARGET_CPU=arm_32
65752     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65753     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65754     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65755   elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65756     HOTSPOT_TARGET_CPU=arm_64
65757     HOTSPOT_TARGET_CPU_ARCH=arm
65758     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65759     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65760   fi
65761 
65762   # Verify that dependencies are met for explicitly set features.
65763   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65764     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65765   fi
65766 
65767   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65768     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65769   fi
65770 
65771   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65772     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65773   fi
65774 
65775   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65776     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65777   fi
65778 
65779   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65780     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65781   fi
65782 
65783   # Turn on additional features based on other parts of configure
65784   if test "x$INCLUDE_DTRACE" = "xtrue"; then
65785     JVM_FEATURES="$JVM_FEATURES dtrace"
65786   else
65787     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65788       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65789     fi
65790   fi
65791 
65792   if test "x$STATIC_BUILD" = "xtrue"; then
65793     JVM_FEATURES="$JVM_FEATURES static-build"
65794   else
65795     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65796       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65797     fi
65798   fi
65799 
65800   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65801     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65802       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65803     fi
65804   fi
65805 
65806   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65807     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65808       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65809     fi
65810   fi
65811 
65812   # Only enable jvmci on x86_64, sparcv9 and aarch64.
65813   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65814      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65815      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65816     JVM_FEATURES_jvmci="jvmci"
65817   else
65818     JVM_FEATURES_jvmci=""
65819   fi
65820 
65821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65822 $as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65823   if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65824     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65825 $as_echo "yes, forced" >&6; }
65826     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65827       as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65828     fi
65829     INCLUDE_GRAAL="true"
65830   else
65831     # By default enable graal build on linux-x64 or where AOT is available.
65832     # graal build requires jvmci.
65833     if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
65834         (test "x$OPENJDK_TARGET_CPU" = "xx86_64" && \
65835          test "x$OPENJDK_TARGET_OS" = "xlinux" || \
65836          test "x$ENABLE_AOT" = "xtrue") ; then
65837       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65838 $as_echo "yes" >&6; }
65839       JVM_FEATURES_graal="graal"
65840       INCLUDE_GRAAL="true"
65841     else
65842       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65843 $as_echo "no" >&6; }
65844       JVM_FEATURES_graal=""
65845       INCLUDE_GRAAL="false"
65846     fi
65847   fi
65848 
65849 
65850 
65851   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65852 $as_echo_n "checking if aot should be enabled... " >&6; }
65853   if test "x$ENABLE_AOT" = "xtrue"; then
65854     if test "x$enable_aot" = "xyes"; then
65855       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65856 $as_echo "yes, forced" >&6; }
65857     else
65858       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65859 $as_echo "yes" >&6; }
65860     fi
65861     JVM_FEATURES_aot="aot"
65862   else
65863     if test "x$enable_aot" = "xno"; then
65864       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65865 $as_echo "no, forced" >&6; }
65866     else
65867       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65868 $as_echo "no" >&6; }
65869     fi
65870     JVM_FEATURES_aot=""
65871   fi
65872 
65873   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65874     # Default to use link time optimizations on minimal on arm
65875     JVM_FEATURES_link_time_opt="link-time-opt"
65876   else
65877     JVM_FEATURES_link_time_opt=""
65878   fi
65879 
65880   # All variants but minimal (and custom) get these features
65881   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
65882   if test "x$ENABLE_CDS" = "xtrue"; then
65883     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
65884   fi
65885 
65886   # Enable features depending on variant.
65887   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65888   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65889   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65890   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65891   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65892   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65893   JVM_FEATURES_custom="$JVM_FEATURES"
65894 
65895 
65896 
65897 
65898 
65899 
65900 
65901 
65902 
65903   # Used for verification of Makefiles by check-jvm-feature
65904 
65905 
65906   # We don't support --with-jvm-interpreter anymore, use zero instead.
65907 
65908 
65909 # Check whether --with-jvm-interpreter was given.
65910 if test "${with_jvm_interpreter+set}" = set; then :
65911   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65912 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65913 fi
65914 
65915 
65916 
65917 
65918 ###############################################################################
65919 #
65920 # We need to do some final tweaking, when everything else is done.
65921 #
65922 ###############################################################################
65923 
65924 
65925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65926 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65927 
65928   if test -d "${TOPDIR}/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65929     ENABLE_INTREE_EC=true
65930     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65931 $as_echo "yes" >&6; }
65932   else
65933     ENABLE_INTREE_EC=false
65934     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65935 $as_echo "no" >&6; }
65936   fi
65937 
65938 
65939 
65940 
65941   # Check whether --enable-jtreg-failure-handler was given.
65942 if test "${enable_jtreg_failure_handler+set}" = set; then :
65943   enableval=$enable_jtreg_failure_handler;
65944 fi
65945 
65946 
65947   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65948 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65949 
65950   if test "x$enable_jtreg_failure_handler" = "xyes"; then
65951     if test "x$JT_HOME" = "x"; then
65952       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65953     else
65954       BUILD_FAILURE_HANDLER=true
65955       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65956 $as_echo "yes, forced" >&6; }
65957     fi
65958   elif test "x$enable_jtreg_failure_handler" = "xno"; then
65959     BUILD_FAILURE_HANDLER=false
65960     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65961 $as_echo "no, forced" >&6; }
65962   elif test "x$enable_jtreg_failure_handler" = "xauto" \
65963       || test "x$enable_jtreg_failure_handler" = "x"; then
65964     if test "x$JT_HOME" = "x"; then
65965       BUILD_FAILURE_HANDLER=false
65966       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65967 $as_echo "no, missing jtreg" >&6; }
65968     else
65969       BUILD_FAILURE_HANDLER=true
65970       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65971 $as_echo "yes, jtreg present" >&6; }
65972     fi
65973   else
65974     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65975   fi
65976 
65977 
65978 
65979 
65980   # Check whether --enable-generate-classlist was given.
65981 if test "${enable_generate_classlist+set}" = set; then :
65982   enableval=$enable_generate_classlist;
65983 fi
65984 
65985 
65986   # Check if it's likely that it's possible to generate the classlist. Depending
65987   # on exact jvm configuration it could be possible anyway.
65988   if test "x$ENABLE_CDS" = "xtrue" && (  [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ); then
65989     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65990   else
65991     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65992   fi
65993 
65994   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65995 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65996   if test "x$enable_generate_classlist" = "xyes"; then
65997     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65998 $as_echo "yes, forced" >&6; }
65999     ENABLE_GENERATE_CLASSLIST="true"
66000     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
66001       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&5
66002 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&2;}
66003     fi
66004   elif test "x$enable_generate_classlist" = "xno"; then
66005     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66006 $as_echo "no, forced" >&6; }
66007     ENABLE_GENERATE_CLASSLIST="false"
66008   elif test "x$enable_generate_classlist" = "x"; then
66009     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
66010       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66011 $as_echo "yes" >&6; }
66012       ENABLE_GENERATE_CLASSLIST="true"
66013     else
66014       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66015 $as_echo "no" >&6; }
66016       ENABLE_GENERATE_CLASSLIST="false"
66017     fi
66018   else
66019     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
66020   fi
66021 
66022 
66023 
66024 
66025 ###############################################################################
66026 #
66027 # Configure parts of the build that only affect the build performance,
66028 # not the result.
66029 #
66030 ###############################################################################
66031 
66032 
66033   # How many cores do we have on this build system?
66034 
66035 # Check whether --with-num-cores was given.
66036 if test "${with_num_cores+set}" = set; then :
66037   withval=$with_num_cores;
66038 fi
66039 
66040   if test "x$with_num_cores" = x; then
66041     # The number of cores were not specified, try to probe them.
66042 
66043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
66044 $as_echo_n "checking for number of cores... " >&6; }
66045   NUM_CORES=1
66046   FOUND_CORES=no
66047 
66048   if test -f /proc/cpuinfo; then
66049     # Looks like a Linux (or cygwin) system
66050     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
66051     FOUND_CORES=yes
66052   elif test -x /usr/sbin/psrinfo; then
66053     # Looks like a Solaris system
66054     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
66055     FOUND_CORES=yes
66056   elif test -x /usr/sbin/sysctl; then
66057     # Looks like a MacOSX system
66058     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
66059     FOUND_CORES=yes
66060   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
66061     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
66062     FOUND_CORES=yes
66063   elif test -n "$NUMBER_OF_PROCESSORS"; then
66064     # On windows, look in the env
66065     NUM_CORES=$NUMBER_OF_PROCESSORS
66066     FOUND_CORES=yes
66067   fi
66068 
66069   if test "x$FOUND_CORES" = xyes; then
66070     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
66071 $as_echo "$NUM_CORES" >&6; }
66072   else
66073     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
66074 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
66075     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
66076 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
66077   fi
66078 
66079   else
66080     NUM_CORES=$with_num_cores
66081   fi
66082 
66083 
66084 
66085   # How much memory do we have on this build system?
66086 
66087 # Check whether --with-memory-size was given.
66088 if test "${with_memory_size+set}" = set; then :
66089   withval=$with_memory_size;
66090 fi
66091 
66092   if test "x$with_memory_size" = x; then
66093     # The memory size was not specified, try to probe it.
66094 
66095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
66096 $as_echo_n "checking for memory size... " >&6; }
66097   # Default to 1024 MB
66098   MEMORY_SIZE=1024
66099   FOUND_MEM=no
66100 
66101   if test -f /proc/meminfo; then
66102     # Looks like a Linux (or cygwin) system
66103     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
66104     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
66105     FOUND_MEM=yes
66106   elif test -x /usr/sbin/prtconf; then
66107     # Looks like a Solaris or AIX system
66108     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
66109     FOUND_MEM=yes
66110   elif test -x /usr/sbin/sysctl; then
66111     # Looks like a MacOSX system
66112     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
66113     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66114     FOUND_MEM=yes
66115   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
66116     # Windows, but without cygwin
66117     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
66118     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66119     FOUND_MEM=yes
66120   fi
66121 
66122   if test "x$FOUND_MEM" = xyes; then
66123     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
66124 $as_echo "$MEMORY_SIZE MB" >&6; }
66125   else
66126     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
66127 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
66128     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
66129 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
66130   fi
66131 
66132   else
66133     MEMORY_SIZE=$with_memory_size
66134   fi
66135 
66136 
66137 
66138   # Provide a decent default number of parallel jobs for make depending on
66139   # number of cores, amount of memory and machine architecture.
66140 
66141 # Check whether --with-jobs was given.
66142 if test "${with_jobs+set}" = set; then :
66143   withval=$with_jobs;
66144 fi
66145 
66146   if test "x$with_jobs" = x; then
66147     # Number of jobs was not specified, calculate.
66148     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
66149 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
66150     # Approximate memory in GB.
66151     memory_gb=`expr $MEMORY_SIZE / 1024`
66152     # Pick the lowest of memory in gb and number of cores.
66153     if test "$memory_gb" -lt "$NUM_CORES"; then
66154       JOBS="$memory_gb"
66155     else
66156       JOBS="$NUM_CORES"
66157     fi
66158     if test "$JOBS" -eq "0"; then
66159       JOBS=1
66160     fi
66161     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
66162 $as_echo "$JOBS" >&6; }
66163   else
66164     JOBS=$with_jobs
66165   fi
66166 
66167 
66168 
66169   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
66170 
66171 # Check whether --with-test-jobs was given.
66172 if test "${with_test_jobs+set}" = set; then :
66173   withval=$with_test_jobs;
66174 fi
66175 
66176   if test "x$with_test_jobs" = x; then
66177       TEST_JOBS=0
66178   else
66179       TEST_JOBS=$with_test_jobs
66180   fi
66181 
66182 
66183 
66184 # Setup arguments for the boot jdk (after cores and memory have been setup)
66185 
66186   ##############################################################################
66187   #
66188   # Specify jvm options for anything that is run with the Boot JDK.
66189   # Not all JVM:s accept the same arguments on the command line.
66190   #
66191 
66192 # Check whether --with-boot-jdk-jvmargs was given.
66193 if test "${with_boot_jdk_jvmargs+set}" = set; then :
66194   withval=$with_boot_jdk_jvmargs;
66195 fi
66196 
66197 
66198   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
66199 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
66200 
66201   # Disable special log output when a debug build is used as Boot JDK...
66202 
66203   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
66204   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
66205   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
66206   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66207   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66208   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66209     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
66210     JVM_ARG_OK=true
66211   else
66212     $ECHO "Arg failed:" >&5
66213     $ECHO "$OUTPUT" >&5
66214     JVM_ARG_OK=false
66215   fi
66216 
66217 
66218   # Force en-US environment
66219 
66220   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
66221   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
66222   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
66223   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66224   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66225   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66226     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
66227     JVM_ARG_OK=true
66228   else
66229     $ECHO "Arg failed:" >&5
66230     $ECHO "$OUTPUT" >&5
66231     JVM_ARG_OK=false
66232   fi
66233 
66234 
66235   # Apply user provided options.
66236 
66237   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
66238   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
66239   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
66240   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66241   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66242   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66243     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
66244     JVM_ARG_OK=true
66245   else
66246     $ECHO "Arg failed:" >&5
66247     $ECHO "$OUTPUT" >&5
66248     JVM_ARG_OK=false
66249   fi
66250 
66251 
66252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66253 $as_echo "$boot_jdk_jvmargs" >&6; }
66254 
66255   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66256   JAVA_FLAGS=$boot_jdk_jvmargs
66257 
66258 
66259 
66260   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66261 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66262 
66263   # Starting amount of heap memory.
66264 
66265   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66266   $ECHO "Command: $JAVA -Xms64M -version" >&5
66267   OUTPUT=`$JAVA -Xms64M -version 2>&1`
66268   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66269   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66270   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66271     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66272     JVM_ARG_OK=true
66273   else
66274     $ECHO "Arg failed:" >&5
66275     $ECHO "$OUTPUT" >&5
66276     JVM_ARG_OK=false
66277   fi
66278 
66279   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66280 
66281   # Maximum amount of heap memory and stack size.
66282   JVM_HEAP_LIMIT_32="1024"
66283   # Running a 64 bit JVM allows for and requires a bigger heap
66284   JVM_HEAP_LIMIT_64="1600"
66285   STACK_SIZE_32=768
66286   STACK_SIZE_64=1536
66287   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66288   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66289     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66290   fi
66291   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66292     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66293   fi
66294   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66295     JVM_HEAP_LIMIT_32=512
66296     JVM_HEAP_LIMIT_64=512
66297   fi
66298 
66299   if test "x$BOOT_JDK_BITS" = "x32"; then
66300     STACK_SIZE=$STACK_SIZE_32
66301     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66302   else
66303     STACK_SIZE=$STACK_SIZE_64
66304     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66305   fi
66306 
66307   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66308   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66309   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66310   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66311   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66312   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66313     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66314     JVM_ARG_OK=true
66315   else
66316     $ECHO "Arg failed:" >&5
66317     $ECHO "$OUTPUT" >&5
66318     JVM_ARG_OK=false
66319   fi
66320 
66321 
66322   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66323   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66324   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66325   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66326   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66327   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66328     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66329     JVM_ARG_OK=true
66330   else
66331     $ECHO "Arg failed:" >&5
66332     $ECHO "$OUTPUT" >&5
66333     JVM_ARG_OK=false
66334   fi
66335 
66336 
66337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66338 $as_echo "$boot_jdk_jvmargs_big" >&6; }
66339 
66340   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66341 
66342 
66343   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66344     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66345     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66346   else
66347     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66348     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66349   fi
66350   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66351   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66352   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66353 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66355 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66356 
66357 
66358   # By default, the main javac compilations use big
66359   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66360 
66361 
66362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66363 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66364 
66365   # Use serial gc for small short lived tools if possible
66366 
66367   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66368   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66369   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66370   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66371   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66372   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66373     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66374     JVM_ARG_OK=true
66375   else
66376     $ECHO "Arg failed:" >&5
66377     $ECHO "$OUTPUT" >&5
66378     JVM_ARG_OK=false
66379   fi
66380 
66381 
66382   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66383   $ECHO "Command: $JAVA -Xms32M -version" >&5
66384   OUTPUT=`$JAVA -Xms32M -version 2>&1`
66385   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66386   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66387   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66388     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66389     JVM_ARG_OK=true
66390   else
66391     $ECHO "Arg failed:" >&5
66392     $ECHO "$OUTPUT" >&5
66393     JVM_ARG_OK=false
66394   fi
66395 
66396 
66397   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66398   $ECHO "Command: $JAVA -Xmx512M -version" >&5
66399   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66400   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66401   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66402   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66403     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66404     JVM_ARG_OK=true
66405   else
66406     $ECHO "Arg failed:" >&5
66407     $ECHO "$OUTPUT" >&5
66408     JVM_ARG_OK=false
66409   fi
66410 
66411 
66412   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66413   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66414   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66415   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66416   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66417   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66418     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66419     JVM_ARG_OK=true
66420   else
66421     $ECHO "Arg failed:" >&5
66422     $ECHO "$OUTPUT" >&5
66423     JVM_ARG_OK=false
66424   fi
66425 
66426 
66427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66428 $as_echo "$boot_jdk_jvmargs_small" >&6; }
66429 
66430   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66431 
66432 
66433   JAVA_TOOL_FLAGS_SMALL=""
66434   for f in $JAVA_FLAGS_SMALL; do
66435     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66436   done
66437 
66438 
66439 
66440 # Setup smart javac (after cores and memory have been setup)
66441 
66442 
66443 # Check whether --with-sjavac-server-java was given.
66444 if test "${with_sjavac_server_java+set}" = set; then :
66445   withval=$with_sjavac_server_java;
66446 fi
66447 
66448 
66449   if test "x$with_sjavac_server_java" != x; then
66450     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66451     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66452     if test "x$FOUND_VERSION" = x; then
66453       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66454     fi
66455   else
66456     SJAVAC_SERVER_JAVA="$JAVA"
66457   fi
66458 
66459 
66460   if test "$MEMORY_SIZE" -gt "3000"; then
66461     if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66462       JVM_64BIT=true
66463     fi
66464   fi
66465 
66466   MX_VALUE=`expr $MEMORY_SIZE / 2`
66467   if test "$JVM_64BIT" = true; then
66468     # Set ms lower than mx since more than one instance of the server might
66469     # get launched at the same time before they figure out which instance won.
66470     MS_VALUE=512
66471     if test "$MX_VALUE" -gt "2048"; then
66472       MX_VALUE=2048
66473     fi
66474   else
66475     MS_VALUE=256
66476     if test "$MX_VALUE" -gt "1500"; then
66477       MX_VALUE=1500
66478     fi
66479   fi
66480   if test "$MX_VALUE" -lt "512"; then
66481     MX_VALUE=512
66482   fi
66483 
66484   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66485   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66486   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66487   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66488   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66489   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66490     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66491     JVM_ARG_OK=true
66492   else
66493     $ECHO "Arg failed:" >&5
66494     $ECHO "$OUTPUT" >&5
66495     JVM_ARG_OK=false
66496   fi
66497 
66498 
66499 
66500   # Check whether --enable-sjavac was given.
66501 if test "${enable_sjavac+set}" = set; then :
66502   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66503 else
66504   ENABLE_SJAVAC="no"
66505 fi
66506 
66507   if test "x$JVM_ARG_OK" = "xfalse"; then
66508     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66509 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66510     ENABLE_SJAVAC="no"
66511   fi
66512   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66513 $as_echo_n "checking whether to use sjavac... " >&6; }
66514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66515 $as_echo "$ENABLE_SJAVAC" >&6; }
66516 
66517 
66518   # Check whether --enable-javac-server was given.
66519 if test "${enable_javac_server+set}" = set; then :
66520   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66521 else
66522   ENABLE_JAVAC_SERVER="yes"
66523 fi
66524 
66525   if test "x$JVM_ARG_OK" = "xfalse"; then
66526     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66527 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66528     ENABLE_JAVAC_SERVER="no"
66529   fi
66530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66531 $as_echo_n "checking whether to use javac server... " >&6; }
66532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66533 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66534 
66535 
66536   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66537     # When using a server javac, the small client instances do not need much
66538     # resources.
66539     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66540   fi
66541 
66542 
66543 # Setup use of icecc if requested
66544 
66545   # Check whether --enable-icecc was given.
66546 if test "${enable_icecc+set}" = set; then :
66547   enableval=$enable_icecc;
66548 fi
66549 
66550 
66551   if test "x${enable_icecc}" = "xyes"; then
66552 
66553 
66554 
66555   # Publish this variable in the help.
66556 
66557 
66558   if [ -z "${ICECC_CMD+x}" ]; then
66559     # The variable is not set by user, try to locate tool using the code snippet
66560     for ac_prog in icecc
66561 do
66562   # Extract the first word of "$ac_prog", so it can be a program name with args.
66563 set dummy $ac_prog; ac_word=$2
66564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66565 $as_echo_n "checking for $ac_word... " >&6; }
66566 if ${ac_cv_path_ICECC_CMD+:} false; then :
66567   $as_echo_n "(cached) " >&6
66568 else
66569   case $ICECC_CMD in
66570   [\\/]* | ?:[\\/]*)
66571   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66572   ;;
66573   *)
66574   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66575 for as_dir in $PATH
66576 do
66577   IFS=$as_save_IFS
66578   test -z "$as_dir" && as_dir=.
66579     for ac_exec_ext in '' $ac_executable_extensions; do
66580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66581     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66583     break 2
66584   fi
66585 done
66586   done
66587 IFS=$as_save_IFS
66588 
66589   ;;
66590 esac
66591 fi
66592 ICECC_CMD=$ac_cv_path_ICECC_CMD
66593 if test -n "$ICECC_CMD"; then
66594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66595 $as_echo "$ICECC_CMD" >&6; }
66596 else
66597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66598 $as_echo "no" >&6; }
66599 fi
66600 
66601 
66602   test -n "$ICECC_CMD" && break
66603 done
66604 
66605   else
66606     # The variable is set, but is it from the command line or the environment?
66607 
66608     # Try to remove the string !ICECC_CMD! from our list.
66609     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66610     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66611       # If it failed, the variable was not from the command line. Ignore it,
66612       # but warn the user (except for BASH, which is always set by the calling BASH).
66613       if test "xICECC_CMD" != xBASH; then
66614         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66615 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66616       fi
66617       # Try to locate tool using the code snippet
66618       for ac_prog in icecc
66619 do
66620   # Extract the first word of "$ac_prog", so it can be a program name with args.
66621 set dummy $ac_prog; ac_word=$2
66622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66623 $as_echo_n "checking for $ac_word... " >&6; }
66624 if ${ac_cv_path_ICECC_CMD+:} false; then :
66625   $as_echo_n "(cached) " >&6
66626 else
66627   case $ICECC_CMD in
66628   [\\/]* | ?:[\\/]*)
66629   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66630   ;;
66631   *)
66632   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66633 for as_dir in $PATH
66634 do
66635   IFS=$as_save_IFS
66636   test -z "$as_dir" && as_dir=.
66637     for ac_exec_ext in '' $ac_executable_extensions; do
66638   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66639     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66640     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66641     break 2
66642   fi
66643 done
66644   done
66645 IFS=$as_save_IFS
66646 
66647   ;;
66648 esac
66649 fi
66650 ICECC_CMD=$ac_cv_path_ICECC_CMD
66651 if test -n "$ICECC_CMD"; then
66652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66653 $as_echo "$ICECC_CMD" >&6; }
66654 else
66655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66656 $as_echo "no" >&6; }
66657 fi
66658 
66659 
66660   test -n "$ICECC_CMD" && break
66661 done
66662 
66663     else
66664       # If it succeeded, then it was overridden by the user. We will use it
66665       # for the tool.
66666 
66667       # First remove it from the list of overridden variables, so we can test
66668       # for unknown variables in the end.
66669       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66670 
66671       # Check if we try to supply an empty value
66672       if test "x$ICECC_CMD" = x; then
66673         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66674 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66675         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66676 $as_echo_n "checking for ICECC_CMD... " >&6; }
66677         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66678 $as_echo "disabled" >&6; }
66679       else
66680         # Check if the provided tool contains a complete path.
66681         tool_specified="$ICECC_CMD"
66682         tool_basename="${tool_specified##*/}"
66683         if test "x$tool_basename" = "x$tool_specified"; then
66684           # A command without a complete path is provided, search $PATH.
66685           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66686 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66687           # Extract the first word of "$tool_basename", so it can be a program name with args.
66688 set dummy $tool_basename; ac_word=$2
66689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66690 $as_echo_n "checking for $ac_word... " >&6; }
66691 if ${ac_cv_path_ICECC_CMD+:} false; then :
66692   $as_echo_n "(cached) " >&6
66693 else
66694   case $ICECC_CMD in
66695   [\\/]* | ?:[\\/]*)
66696   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66697   ;;
66698   *)
66699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66700 for as_dir in $PATH
66701 do
66702   IFS=$as_save_IFS
66703   test -z "$as_dir" && as_dir=.
66704     for ac_exec_ext in '' $ac_executable_extensions; do
66705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66706     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66708     break 2
66709   fi
66710 done
66711   done
66712 IFS=$as_save_IFS
66713 
66714   ;;
66715 esac
66716 fi
66717 ICECC_CMD=$ac_cv_path_ICECC_CMD
66718 if test -n "$ICECC_CMD"; then
66719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66720 $as_echo "$ICECC_CMD" >&6; }
66721 else
66722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66723 $as_echo "no" >&6; }
66724 fi
66725 
66726 
66727           if test "x$ICECC_CMD" = x; then
66728             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66729           fi
66730         else
66731           # Otherwise we believe it is a complete path. Use it as it is.
66732           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66733 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66734           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66735 $as_echo_n "checking for ICECC_CMD... " >&6; }
66736           if test ! -x "$tool_specified"; then
66737             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66738 $as_echo "not found" >&6; }
66739             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66740           fi
66741           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66742 $as_echo "$tool_specified" >&6; }
66743         fi
66744       fi
66745     fi
66746 
66747   fi
66748 
66749 
66750 
66751   if test "x$ICECC_CMD" = x; then
66752     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66753   fi
66754 
66755 
66756     old_path="$PATH"
66757 
66758     # Look for icecc-create-env in some known places
66759     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66760 
66761 
66762 
66763   # Publish this variable in the help.
66764 
66765 
66766   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66767     # The variable is not set by user, try to locate tool using the code snippet
66768     for ac_prog in icecc-create-env
66769 do
66770   # Extract the first word of "$ac_prog", so it can be a program name with args.
66771 set dummy $ac_prog; ac_word=$2
66772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66773 $as_echo_n "checking for $ac_word... " >&6; }
66774 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66775   $as_echo_n "(cached) " >&6
66776 else
66777   case $ICECC_CREATE_ENV in
66778   [\\/]* | ?:[\\/]*)
66779   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66780   ;;
66781   *)
66782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66783 for as_dir in $PATH
66784 do
66785   IFS=$as_save_IFS
66786   test -z "$as_dir" && as_dir=.
66787     for ac_exec_ext in '' $ac_executable_extensions; do
66788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66789     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66791     break 2
66792   fi
66793 done
66794   done
66795 IFS=$as_save_IFS
66796 
66797   ;;
66798 esac
66799 fi
66800 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66801 if test -n "$ICECC_CREATE_ENV"; then
66802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66803 $as_echo "$ICECC_CREATE_ENV" >&6; }
66804 else
66805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66806 $as_echo "no" >&6; }
66807 fi
66808 
66809 
66810   test -n "$ICECC_CREATE_ENV" && break
66811 done
66812 
66813   else
66814     # The variable is set, but is it from the command line or the environment?
66815 
66816     # Try to remove the string !ICECC_CREATE_ENV! from our list.
66817     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66818     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66819       # If it failed, the variable was not from the command line. Ignore it,
66820       # but warn the user (except for BASH, which is always set by the calling BASH).
66821       if test "xICECC_CREATE_ENV" != xBASH; then
66822         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66823 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66824       fi
66825       # Try to locate tool using the code snippet
66826       for ac_prog in icecc-create-env
66827 do
66828   # Extract the first word of "$ac_prog", so it can be a program name with args.
66829 set dummy $ac_prog; ac_word=$2
66830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66831 $as_echo_n "checking for $ac_word... " >&6; }
66832 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66833   $as_echo_n "(cached) " >&6
66834 else
66835   case $ICECC_CREATE_ENV in
66836   [\\/]* | ?:[\\/]*)
66837   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66838   ;;
66839   *)
66840   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66841 for as_dir in $PATH
66842 do
66843   IFS=$as_save_IFS
66844   test -z "$as_dir" && as_dir=.
66845     for ac_exec_ext in '' $ac_executable_extensions; do
66846   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66847     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66848     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66849     break 2
66850   fi
66851 done
66852   done
66853 IFS=$as_save_IFS
66854 
66855   ;;
66856 esac
66857 fi
66858 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66859 if test -n "$ICECC_CREATE_ENV"; then
66860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66861 $as_echo "$ICECC_CREATE_ENV" >&6; }
66862 else
66863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66864 $as_echo "no" >&6; }
66865 fi
66866 
66867 
66868   test -n "$ICECC_CREATE_ENV" && break
66869 done
66870 
66871     else
66872       # If it succeeded, then it was overridden by the user. We will use it
66873       # for the tool.
66874 
66875       # First remove it from the list of overridden variables, so we can test
66876       # for unknown variables in the end.
66877       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66878 
66879       # Check if we try to supply an empty value
66880       if test "x$ICECC_CREATE_ENV" = x; then
66881         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66882 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66883         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66884 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66885         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66886 $as_echo "disabled" >&6; }
66887       else
66888         # Check if the provided tool contains a complete path.
66889         tool_specified="$ICECC_CREATE_ENV"
66890         tool_basename="${tool_specified##*/}"
66891         if test "x$tool_basename" = "x$tool_specified"; then
66892           # A command without a complete path is provided, search $PATH.
66893           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66894 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66895           # Extract the first word of "$tool_basename", so it can be a program name with args.
66896 set dummy $tool_basename; ac_word=$2
66897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66898 $as_echo_n "checking for $ac_word... " >&6; }
66899 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66900   $as_echo_n "(cached) " >&6
66901 else
66902   case $ICECC_CREATE_ENV in
66903   [\\/]* | ?:[\\/]*)
66904   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66905   ;;
66906   *)
66907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66908 for as_dir in $PATH
66909 do
66910   IFS=$as_save_IFS
66911   test -z "$as_dir" && as_dir=.
66912     for ac_exec_ext in '' $ac_executable_extensions; do
66913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66914     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66916     break 2
66917   fi
66918 done
66919   done
66920 IFS=$as_save_IFS
66921 
66922   ;;
66923 esac
66924 fi
66925 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66926 if test -n "$ICECC_CREATE_ENV"; then
66927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66928 $as_echo "$ICECC_CREATE_ENV" >&6; }
66929 else
66930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66931 $as_echo "no" >&6; }
66932 fi
66933 
66934 
66935           if test "x$ICECC_CREATE_ENV" = x; then
66936             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66937           fi
66938         else
66939           # Otherwise we believe it is a complete path. Use it as it is.
66940           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66941 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66942           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66943 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66944           if test ! -x "$tool_specified"; then
66945             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66946 $as_echo "not found" >&6; }
66947             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66948           fi
66949           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66950 $as_echo "$tool_specified" >&6; }
66951         fi
66952       fi
66953     fi
66954 
66955   fi
66956 
66957 
66958 
66959   if test "x$ICECC_CREATE_ENV" = x; then
66960     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66961   fi
66962 
66963 
66964     # Use icecc-create-env to create a minimal compilation environment that can
66965     # be sent to the other hosts in the icecream cluster.
66966     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66967     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66968     # Older versions of icecc does not have the --gcc parameter
66969     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66970       icecc_gcc_arg="--gcc"
66971     fi
66972     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66973 
66974   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66975       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66976           ${icecc_create_env_log} 2>&1 )
66977   if test "$?" != "0"; then
66978     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66979 $as_echo "$as_me: icecc-create-env output:" >&6;}
66980     cat \
66981           ${icecc_create_env_log}
66982     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66983   fi
66984 
66985     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66986       # For clang, the icecc compilerwrapper is needed. It usually resides next
66987       # to icecc-create-env.
66988 
66989 
66990 
66991   # Publish this variable in the help.
66992 
66993 
66994   if [ -z "${ICECC_WRAPPER+x}" ]; then
66995     # The variable is not set by user, try to locate tool using the code snippet
66996     for ac_prog in compilerwrapper
66997 do
66998   # Extract the first word of "$ac_prog", so it can be a program name with args.
66999 set dummy $ac_prog; ac_word=$2
67000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67001 $as_echo_n "checking for $ac_word... " >&6; }
67002 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67003   $as_echo_n "(cached) " >&6
67004 else
67005   case $ICECC_WRAPPER in
67006   [\\/]* | ?:[\\/]*)
67007   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67008   ;;
67009   *)
67010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67011 for as_dir in $PATH
67012 do
67013   IFS=$as_save_IFS
67014   test -z "$as_dir" && as_dir=.
67015     for ac_exec_ext in '' $ac_executable_extensions; do
67016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67017     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67019     break 2
67020   fi
67021 done
67022   done
67023 IFS=$as_save_IFS
67024 
67025   ;;
67026 esac
67027 fi
67028 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67029 if test -n "$ICECC_WRAPPER"; then
67030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67031 $as_echo "$ICECC_WRAPPER" >&6; }
67032 else
67033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67034 $as_echo "no" >&6; }
67035 fi
67036 
67037 
67038   test -n "$ICECC_WRAPPER" && break
67039 done
67040 
67041   else
67042     # The variable is set, but is it from the command line or the environment?
67043 
67044     # Try to remove the string !ICECC_WRAPPER! from our list.
67045     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
67046     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67047       # If it failed, the variable was not from the command line. Ignore it,
67048       # but warn the user (except for BASH, which is always set by the calling BASH).
67049       if test "xICECC_WRAPPER" != xBASH; then
67050         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
67051 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
67052       fi
67053       # Try to locate tool using the code snippet
67054       for ac_prog in compilerwrapper
67055 do
67056   # Extract the first word of "$ac_prog", so it can be a program name with args.
67057 set dummy $ac_prog; ac_word=$2
67058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67059 $as_echo_n "checking for $ac_word... " >&6; }
67060 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67061   $as_echo_n "(cached) " >&6
67062 else
67063   case $ICECC_WRAPPER in
67064   [\\/]* | ?:[\\/]*)
67065   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67066   ;;
67067   *)
67068   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67069 for as_dir in $PATH
67070 do
67071   IFS=$as_save_IFS
67072   test -z "$as_dir" && as_dir=.
67073     for ac_exec_ext in '' $ac_executable_extensions; do
67074   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67075     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67076     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67077     break 2
67078   fi
67079 done
67080   done
67081 IFS=$as_save_IFS
67082 
67083   ;;
67084 esac
67085 fi
67086 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67087 if test -n "$ICECC_WRAPPER"; then
67088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67089 $as_echo "$ICECC_WRAPPER" >&6; }
67090 else
67091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67092 $as_echo "no" >&6; }
67093 fi
67094 
67095 
67096   test -n "$ICECC_WRAPPER" && break
67097 done
67098 
67099     else
67100       # If it succeeded, then it was overridden by the user. We will use it
67101       # for the tool.
67102 
67103       # First remove it from the list of overridden variables, so we can test
67104       # for unknown variables in the end.
67105       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67106 
67107       # Check if we try to supply an empty value
67108       if test "x$ICECC_WRAPPER" = x; then
67109         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
67110 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
67111         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67112 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67113         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67114 $as_echo "disabled" >&6; }
67115       else
67116         # Check if the provided tool contains a complete path.
67117         tool_specified="$ICECC_WRAPPER"
67118         tool_basename="${tool_specified##*/}"
67119         if test "x$tool_basename" = "x$tool_specified"; then
67120           # A command without a complete path is provided, search $PATH.
67121           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
67122 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
67123           # Extract the first word of "$tool_basename", so it can be a program name with args.
67124 set dummy $tool_basename; ac_word=$2
67125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67126 $as_echo_n "checking for $ac_word... " >&6; }
67127 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67128   $as_echo_n "(cached) " >&6
67129 else
67130   case $ICECC_WRAPPER in
67131   [\\/]* | ?:[\\/]*)
67132   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67133   ;;
67134   *)
67135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67136 for as_dir in $PATH
67137 do
67138   IFS=$as_save_IFS
67139   test -z "$as_dir" && as_dir=.
67140     for ac_exec_ext in '' $ac_executable_extensions; do
67141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67142     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67144     break 2
67145   fi
67146 done
67147   done
67148 IFS=$as_save_IFS
67149 
67150   ;;
67151 esac
67152 fi
67153 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67154 if test -n "$ICECC_WRAPPER"; then
67155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67156 $as_echo "$ICECC_WRAPPER" >&6; }
67157 else
67158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67159 $as_echo "no" >&6; }
67160 fi
67161 
67162 
67163           if test "x$ICECC_WRAPPER" = x; then
67164             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67165           fi
67166         else
67167           # Otherwise we believe it is a complete path. Use it as it is.
67168           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
67169 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
67170           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67171 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67172           if test ! -x "$tool_specified"; then
67173             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67174 $as_echo "not found" >&6; }
67175             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
67176           fi
67177           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67178 $as_echo "$tool_specified" >&6; }
67179         fi
67180       fi
67181     fi
67182 
67183   fi
67184 
67185 
67186 
67187   if test "x$ICECC_WRAPPER" = x; then
67188     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
67189   fi
67190 
67191 
67192 
67193   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67194       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
67195   if test "$?" != "0"; then
67196     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67197 $as_echo "$as_me: icecc-create-env output:" >&6;}
67198     cat ${icecc_create_env_log}
67199     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67200   fi
67201 
67202     else
67203       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
67204     fi
67205     PATH="$old_path"
67206     # The bundle with the compiler gets a name based on checksums. Parse log file
67207     # to find it.
67208     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
67209     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67210     if test ! -f ${ICECC_ENV_BUNDLE}; then
67211       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67212     fi
67213     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
67214 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
67215     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67216 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67217     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
67218 
67219     if test "x${COMPILE_TYPE}" = "xcross"; then
67220       # If cross compiling, create a separate env package for the build compiler
67221       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
67222       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
67223       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
67224 
67225   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67226       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67227             ${icecc_create_env_log_build} 2>&1 )
67228   if test "$?" != "0"; then
67229     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67230 $as_echo "$as_me: icecc-create-env output:" >&6;}
67231     cat \
67232             ${icecc_create_env_log_build}
67233     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67234   fi
67235 
67236       elif test "x${BUILD_CC##*/}" = "xclang"; then
67237 
67238   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67239       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67240   if test "$?" != "0"; then
67241     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67242 $as_echo "$as_me: icecc-create-env output:" >&6;}
67243     cat ${icecc_create_env_log_build}
67244     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67245   fi
67246 
67247       else
67248         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67249       fi
67250       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67251       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67252       if test ! -f ${ICECC_ENV_BUNDLE}; then
67253         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67254       fi
67255       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67256 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67257       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67258 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67259       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67260           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67261     else
67262       BUILD_ICECC="${ICECC}"
67263     fi
67264 
67265 
67266   fi
67267 
67268 
67269 # Can the C/C++ compiler use precompiled headers?
67270 
67271 
67272   ###############################################################################
67273   #
67274   # Can the C/C++ compiler use precompiled headers?
67275   #
67276   # Check whether --enable-precompiled-headers was given.
67277 if test "${enable_precompiled_headers+set}" = set; then :
67278   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67279 else
67280   ENABLE_PRECOMPH=yes
67281 fi
67282 
67283 
67284   USE_PRECOMPILED_HEADER=true
67285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67286 $as_echo_n "checking If precompiled header is enabled... " >&6; }
67287   if test "x$ENABLE_PRECOMPH" = xno; then
67288     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67289 $as_echo "no, forced" >&6; }
67290     USE_PRECOMPILED_HEADER=false
67291   elif test "x$ICECC" != "x"; then
67292     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67293 $as_echo "no, does not work effectively with icecc" >&6; }
67294     USE_PRECOMPILED_HEADER=false
67295   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67296     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67297 $as_echo "no, does not work with Solaris Studio" >&6; }
67298     USE_PRECOMPILED_HEADER=false
67299   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67300     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67301 $as_echo "no, does not work with xlc" >&6; }
67302     USE_PRECOMPILED_HEADER=false
67303   else
67304     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67305 $as_echo "yes" >&6; }
67306   fi
67307 
67308   if test "x$ENABLE_PRECOMPH" = xyes; then
67309     # Check that the compiler actually supports precomp headers.
67310     if test "x$TOOLCHAIN_TYPE" = xgcc; then
67311       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67312 $as_echo_n "checking that precompiled headers work... " >&6; }
67313       echo "int alfa();" > conftest.h
67314       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67315       if test ! -f conftest.hpp.gch; then
67316         USE_PRECOMPILED_HEADER=false
67317         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67318 $as_echo "no" >&6; }
67319       else
67320         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67321 $as_echo "yes" >&6; }
67322       fi
67323       $RM conftest.h conftest.hpp.gch
67324     fi
67325   fi
67326 
67327 
67328 
67329 
67330 # Setup use of ccache, if available
67331 
67332   # Check whether --enable-ccache was given.
67333 if test "${enable_ccache+set}" = set; then :
67334   enableval=$enable_ccache;
67335 fi
67336 
67337 
67338   CCACHE_STATUS=
67339   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67340 $as_echo_n "checking is ccache enabled... " >&6; }
67341   if test "x$enable_ccache" = xyes; then
67342     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67343       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67344 $as_echo "yes" >&6; }
67345       OLD_PATH="$PATH"
67346       if test "x$TOOLCHAIN_PATH" != x; then
67347         PATH=$TOOLCHAIN_PATH:$PATH
67348       fi
67349 
67350 
67351 
67352   # Publish this variable in the help.
67353 
67354 
67355   if [ -z "${CCACHE+x}" ]; then
67356     # The variable is not set by user, try to locate tool using the code snippet
67357     for ac_prog in ccache
67358 do
67359   # Extract the first word of "$ac_prog", so it can be a program name with args.
67360 set dummy $ac_prog; ac_word=$2
67361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67362 $as_echo_n "checking for $ac_word... " >&6; }
67363 if ${ac_cv_path_CCACHE+:} false; then :
67364   $as_echo_n "(cached) " >&6
67365 else
67366   case $CCACHE in
67367   [\\/]* | ?:[\\/]*)
67368   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67369   ;;
67370   *)
67371   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67372 for as_dir in $PATH
67373 do
67374   IFS=$as_save_IFS
67375   test -z "$as_dir" && as_dir=.
67376     for ac_exec_ext in '' $ac_executable_extensions; do
67377   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67378     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67379     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67380     break 2
67381   fi
67382 done
67383   done
67384 IFS=$as_save_IFS
67385 
67386   ;;
67387 esac
67388 fi
67389 CCACHE=$ac_cv_path_CCACHE
67390 if test -n "$CCACHE"; then
67391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67392 $as_echo "$CCACHE" >&6; }
67393 else
67394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67395 $as_echo "no" >&6; }
67396 fi
67397 
67398 
67399   test -n "$CCACHE" && break
67400 done
67401 
67402   else
67403     # The variable is set, but is it from the command line or the environment?
67404 
67405     # Try to remove the string !CCACHE! from our list.
67406     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67407     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67408       # If it failed, the variable was not from the command line. Ignore it,
67409       # but warn the user (except for BASH, which is always set by the calling BASH).
67410       if test "xCCACHE" != xBASH; then
67411         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67412 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67413       fi
67414       # Try to locate tool using the code snippet
67415       for ac_prog in ccache
67416 do
67417   # Extract the first word of "$ac_prog", so it can be a program name with args.
67418 set dummy $ac_prog; ac_word=$2
67419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67420 $as_echo_n "checking for $ac_word... " >&6; }
67421 if ${ac_cv_path_CCACHE+:} false; then :
67422   $as_echo_n "(cached) " >&6
67423 else
67424   case $CCACHE in
67425   [\\/]* | ?:[\\/]*)
67426   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67427   ;;
67428   *)
67429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67430 for as_dir in $PATH
67431 do
67432   IFS=$as_save_IFS
67433   test -z "$as_dir" && as_dir=.
67434     for ac_exec_ext in '' $ac_executable_extensions; do
67435   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67436     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67438     break 2
67439   fi
67440 done
67441   done
67442 IFS=$as_save_IFS
67443 
67444   ;;
67445 esac
67446 fi
67447 CCACHE=$ac_cv_path_CCACHE
67448 if test -n "$CCACHE"; then
67449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67450 $as_echo "$CCACHE" >&6; }
67451 else
67452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67453 $as_echo "no" >&6; }
67454 fi
67455 
67456 
67457   test -n "$CCACHE" && break
67458 done
67459 
67460     else
67461       # If it succeeded, then it was overridden by the user. We will use it
67462       # for the tool.
67463 
67464       # First remove it from the list of overridden variables, so we can test
67465       # for unknown variables in the end.
67466       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67467 
67468       # Check if we try to supply an empty value
67469       if test "x$CCACHE" = x; then
67470         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67471 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67472         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67473 $as_echo_n "checking for CCACHE... " >&6; }
67474         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67475 $as_echo "disabled" >&6; }
67476       else
67477         # Check if the provided tool contains a complete path.
67478         tool_specified="$CCACHE"
67479         tool_basename="${tool_specified##*/}"
67480         if test "x$tool_basename" = "x$tool_specified"; then
67481           # A command without a complete path is provided, search $PATH.
67482           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67483 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67484           # Extract the first word of "$tool_basename", so it can be a program name with args.
67485 set dummy $tool_basename; ac_word=$2
67486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67487 $as_echo_n "checking for $ac_word... " >&6; }
67488 if ${ac_cv_path_CCACHE+:} false; then :
67489   $as_echo_n "(cached) " >&6
67490 else
67491   case $CCACHE in
67492   [\\/]* | ?:[\\/]*)
67493   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67494   ;;
67495   *)
67496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67497 for as_dir in $PATH
67498 do
67499   IFS=$as_save_IFS
67500   test -z "$as_dir" && as_dir=.
67501     for ac_exec_ext in '' $ac_executable_extensions; do
67502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67503     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67505     break 2
67506   fi
67507 done
67508   done
67509 IFS=$as_save_IFS
67510 
67511   ;;
67512 esac
67513 fi
67514 CCACHE=$ac_cv_path_CCACHE
67515 if test -n "$CCACHE"; then
67516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67517 $as_echo "$CCACHE" >&6; }
67518 else
67519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67520 $as_echo "no" >&6; }
67521 fi
67522 
67523 
67524           if test "x$CCACHE" = x; then
67525             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67526           fi
67527         else
67528           # Otherwise we believe it is a complete path. Use it as it is.
67529           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67530 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67531           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67532 $as_echo_n "checking for CCACHE... " >&6; }
67533           if test ! -x "$tool_specified"; then
67534             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67535 $as_echo "not found" >&6; }
67536             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67537           fi
67538           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67539 $as_echo "$tool_specified" >&6; }
67540         fi
67541       fi
67542     fi
67543 
67544   fi
67545 
67546 
67547 
67548   if test "x$CCACHE" = x; then
67549     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67550   fi
67551 
67552 
67553       PATH="$OLD_PATH"
67554       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67555       CCACHE_STATUS="Active ($CCACHE_VERSION)"
67556     else
67557       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67558 $as_echo "no" >&6; }
67559       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67560 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67561     fi
67562   elif test "x$enable_ccache" = xno; then
67563     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67564 $as_echo "no, explicitly disabled" >&6; }
67565     CCACHE_STATUS="Disabled"
67566   elif test "x$enable_ccache" = x; then
67567     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67568 $as_echo "no" >&6; }
67569   else
67570     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67571 $as_echo "unknown" >&6; }
67572     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67573   fi
67574 
67575 
67576 
67577 # Check whether --with-ccache-dir was given.
67578 if test "${with_ccache_dir+set}" = set; then :
67579   withval=$with_ccache_dir;
67580 fi
67581 
67582 
67583   if test "x$with_ccache_dir" != x; then
67584     # When using a non home ccache directory, assume the use is to share ccache files
67585     # with other users. Thus change the umask.
67586     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67587     if test "x$CCACHE" = x; then
67588       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67589 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67590     fi
67591   fi
67592 
67593   if test "x$CCACHE" != x; then
67594 
67595   if test "x$CCACHE" != x; then
67596     if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67597       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67598           $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67599       if test "x$HAS_BAD_CCACHE" != "x"; then
67600         as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67601       fi
67602     fi
67603     if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67604       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67605           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67606       if test "x$HAS_BAD_CCACHE" != "x"; then
67607         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67608       fi
67609       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67610 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67611       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67612       PUSHED_FLAGS="$CXXFLAGS"
67613       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67614       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67615 /* end confdefs.h.  */
67616 
67617 int
67618 main ()
67619 {
67620 
67621   ;
67622   return 0;
67623 }
67624 _ACEOF
67625 if ac_fn_cxx_try_compile "$LINENO"; then :
67626   CC_KNOWS_CCACHE_TRICK=yes
67627 else
67628   CC_KNOWS_CCACHE_TRICK=no
67629 fi
67630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67631       CXXFLAGS="$PUSHED_FLAGS"
67632       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67633         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67634 $as_echo "yes" >&6; }
67635         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67636 
67637         CCACHE_SLOPPINESS=pch_defines,time_macros
67638       else
67639         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67640 $as_echo "no" >&6; }
67641         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67642       fi
67643     fi
67644 
67645     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67646         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67647 
67648     if test "x$SET_CCACHE_DIR" != x; then
67649       mkdir -p $CCACHE_DIR > /dev/null 2>&1
67650       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67651     fi
67652   fi
67653 
67654   fi
67655 
67656 
67657 ###############################################################################
67658 #
67659 # And now the finish...
67660 #
67661 ###############################################################################
67662 
67663 # Check for some common pitfalls
67664 
67665   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67666     file_to_test="$TOPDIR/LICENSE"
67667     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67668       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
67669     fi
67670   fi
67671 
67672 
67673   # Did user specify any unknown variables?
67674 
67675   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67676     # Replace the separating ! with spaces before presenting for end user.
67677     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67678     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67679 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67680   fi
67681 
67682 
67683   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67684 $as_echo_n "checking if build directory is on local disk... " >&6; }
67685 
67686   # df -l lists only local disks; if the given directory is not found then
67687   # a non-zero exit code is given
67688   if test "x$DF" = x; then
67689     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67690       # msys does not have df; use Windows "net use" instead.
67691       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67692       if test "x$IS_NETWORK_DISK" = x; then
67693         OUTPUT_DIR_IS_LOCAL="yes"
67694       else
67695         OUTPUT_DIR_IS_LOCAL="no"
67696       fi
67697     else
67698       # No df here, say it's local
67699       OUTPUT_DIR_IS_LOCAL="yes"
67700     fi
67701   else
67702     if $DF -l $OUTPUTDIR > /dev/null 2>&1; then
67703       OUTPUT_DIR_IS_LOCAL="yes"
67704     else
67705       OUTPUT_DIR_IS_LOCAL="no"
67706     fi
67707   fi
67708 
67709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67710 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67711 
67712 
67713 
67714   # Check if the user has any old-style ALT_ variables set.
67715   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67716 
67717   # Before generating output files, test if they exist. If they do, this is a reconfigure.
67718   # Since we can't properly handle the dependencies for this, warn the user about the situation
67719   if test -e $OUTPUTDIR/spec.gmk; then
67720     IS_RECONFIGURE=yes
67721   else
67722     IS_RECONFIGURE=no
67723   fi
67724 
67725 
67726 # At the end, call the custom hook. (Dummy macro if no custom sources available)
67727 
67728 
67729 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67730 
67731   # Keep feature lists sorted and free of duplicates
67732   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67733   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67734   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67735   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67736   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67737   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67738   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67739 
67740   # Validate features
67741   for variant in $JVM_VARIANTS; do
67742     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67743 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67744     features_var_name=JVM_FEATURES_$variant
67745     JVM_FEATURES_TO_TEST=${!features_var_name}
67746     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67747 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67748     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67749     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67750     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67751     if test "x$INVALID_FEATURES" != x; then
67752       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67753     fi
67754   done
67755 
67756 
67757 # We're messing a bit with internal autoconf variables to put the config.status
67758 # in the output directory instead of the current directory.
67759 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67760 
67761 # Create the actual output files. Now the main work of configure is done.
67762 cat >confcache <<\_ACEOF
67763 # This file is a shell script that caches the results of configure
67764 # tests run on this system so they can be shared between configure
67765 # scripts and configure runs, see configure's option --config-cache.
67766 # It is not useful on other systems.  If it contains results you don't
67767 # want to keep, you may remove or edit it.
67768 #
67769 # config.status only pays attention to the cache file if you give it
67770 # the --recheck option to rerun configure.
67771 #
67772 # `ac_cv_env_foo' variables (set or unset) will be overridden when
67773 # loading this file, other *unset* `ac_cv_foo' will be assigned the
67774 # following values.
67775 
67776 _ACEOF
67777 
67778 # The following way of writing the cache mishandles newlines in values,
67779 # but we know of no workaround that is simple, portable, and efficient.
67780 # So, we kill variables containing newlines.
67781 # Ultrix sh set writes to stderr and can't be redirected directly,
67782 # and sets the high bit in the cache file unless we assign to the vars.
67783 (
67784   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67785     eval ac_val=\$$ac_var
67786     case $ac_val in #(
67787     *${as_nl}*)
67788       case $ac_var in #(
67789       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67790 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67791       esac
67792       case $ac_var in #(
67793       _ | IFS | as_nl) ;; #(
67794       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67795       *) { eval $ac_var=; unset $ac_var;} ;;
67796       esac ;;
67797     esac
67798   done
67799 
67800   (set) 2>&1 |
67801     case $as_nl`(ac_space=' '; set) 2>&1` in #(
67802     *${as_nl}ac_space=\ *)
67803       # `set' does not quote correctly, so add quotes: double-quote
67804       # substitution turns \\\\ into \\, and sed turns \\ into \.
67805       sed -n \
67806         "s/'/'\\\\''/g;
67807           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67808       ;; #(
67809     *)
67810       # `set' quotes correctly as required by POSIX, so do not add quotes.
67811       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67812       ;;
67813     esac |
67814     sort
67815 ) |
67816   sed '
67817      /^ac_cv_env_/b end
67818      t clear
67819      :clear
67820      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67821      t end
67822      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67823      :end' >>confcache
67824 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67825   if test -w "$cache_file"; then
67826     if test "x$cache_file" != "x/dev/null"; then
67827       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67828 $as_echo "$as_me: updating cache $cache_file" >&6;}
67829       if test ! -f "$cache_file" || test -h "$cache_file"; then
67830         cat confcache >"$cache_file"
67831       else
67832         case $cache_file in #(
67833         */* | ?:*)
67834           mv -f confcache "$cache_file"$$ &&
67835           mv -f "$cache_file"$$ "$cache_file" ;; #(
67836         *)
67837           mv -f confcache "$cache_file" ;;
67838         esac
67839       fi
67840     fi
67841   else
67842     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67843 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67844   fi
67845 fi
67846 rm -f confcache
67847 
67848 test "x$prefix" = xNONE && prefix=$ac_default_prefix
67849 # Let make expand exec_prefix.
67850 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67851 
67852 # Transform confdefs.h into DEFS.
67853 # Protect against shell expansion while executing Makefile rules.
67854 # Protect against Makefile macro expansion.
67855 #
67856 # If the first sed substitution is executed (which looks for macros that
67857 # take arguments), then branch to the quote section.  Otherwise,
67858 # look for a macro that doesn't take arguments.
67859 ac_script='
67860 :mline
67861 /\\$/{
67862  N
67863  s,\\\n,,
67864  b mline
67865 }
67866 t clear
67867 :clear
67868 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
67869 t quote
67870 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
67871 t quote
67872 b any
67873 :quote
67874 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67875 s/\[/\\&/g
67876 s/\]/\\&/g
67877 s/\$/$$/g
67878 H
67879 :any
67880 ${
67881         g
67882         s/^\n//
67883         s/\n/ /g
67884         p
67885 }
67886 '
67887 DEFS=`sed -n "$ac_script" confdefs.h`
67888 
67889 
67890 ac_libobjs=
67891 ac_ltlibobjs=
67892 U=
67893 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67894   # 1. Remove the extension, and $U if already installed.
67895   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67896   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67897   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67898   #    will be set to the directory where LIBOBJS objects are built.
67899   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67900   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67901 done
67902 LIBOBJS=$ac_libobjs
67903 
67904 LTLIBOBJS=$ac_ltlibobjs
67905 
67906 
67907 
67908 : "${CONFIG_STATUS=./config.status}"
67909 ac_write_fail=0
67910 ac_clean_files_save=$ac_clean_files
67911 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67912 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67913 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67914 as_write_fail=0
67915 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67916 #! $SHELL
67917 # Generated by $as_me.
67918 # Run this file to recreate the current configuration.
67919 # Compiler output produced by configure, useful for debugging
67920 # configure, is in config.log if it exists.
67921 
67922 debug=false
67923 ac_cs_recheck=false
67924 ac_cs_silent=false
67925 
67926 SHELL=\${CONFIG_SHELL-$SHELL}
67927 export SHELL
67928 _ASEOF
67929 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67930 ## -------------------- ##
67931 ## M4sh Initialization. ##
67932 ## -------------------- ##
67933 
67934 # Be more Bourne compatible
67935 DUALCASE=1; export DUALCASE # for MKS sh
67936 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67937   emulate sh
67938   NULLCMD=:
67939   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67940   # is contrary to our usage.  Disable this feature.
67941   alias -g '${1+"$@"}'='"$@"'
67942   setopt NO_GLOB_SUBST
67943 else
67944   case `(set -o) 2>/dev/null` in #(
67945   *posix*) :
67946     set -o posix ;; #(
67947   *) :
67948      ;;
67949 esac
67950 fi
67951 
67952 
67953 as_nl='
67954 '
67955 export as_nl
67956 # Printing a long string crashes Solaris 7 /usr/bin/printf.
67957 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67958 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67959 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67960 # Prefer a ksh shell builtin over an external printf program on Solaris,
67961 # but without wasting forks for bash or zsh.
67962 if test -z "$BASH_VERSION$ZSH_VERSION" \
67963     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67964   as_echo='print -r --'
67965   as_echo_n='print -rn --'
67966 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67967   as_echo='printf %s\n'
67968   as_echo_n='printf %s'
67969 else
67970   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67971     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67972     as_echo_n='/usr/ucb/echo -n'
67973   else
67974     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67975     as_echo_n_body='eval
67976       arg=$1;
67977       case $arg in #(
67978       *"$as_nl"*)
67979         expr "X$arg" : "X\\(.*\\)$as_nl";
67980         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67981       esac;
67982       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67983     '
67984     export as_echo_n_body
67985     as_echo_n='sh -c $as_echo_n_body as_echo'
67986   fi
67987   export as_echo_body
67988   as_echo='sh -c $as_echo_body as_echo'
67989 fi
67990 
67991 # The user is always right.
67992 if test "${PATH_SEPARATOR+set}" != set; then
67993   PATH_SEPARATOR=:
67994   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67995     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67996       PATH_SEPARATOR=';'
67997   }
67998 fi
67999 
68000 
68001 # IFS
68002 # We need space, tab and new line, in precisely that order.  Quoting is
68003 # there to prevent editors from complaining about space-tab.
68004 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
68005 # splitting by setting IFS to empty value.)
68006 IFS=" ""        $as_nl"
68007 
68008 # Find who we are.  Look in the path if we contain no directory separator.
68009 as_myself=
68010 case $0 in #((
68011   *[\\/]* ) as_myself=$0 ;;
68012   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68013 for as_dir in $PATH
68014 do
68015   IFS=$as_save_IFS
68016   test -z "$as_dir" && as_dir=.
68017     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
68018   done
68019 IFS=$as_save_IFS
68020 
68021      ;;
68022 esac
68023 # We did not find ourselves, most probably we were run as `sh COMMAND'
68024 # in which case we are not to be found in the path.
68025 if test "x$as_myself" = x; then
68026   as_myself=$0
68027 fi
68028 if test ! -f "$as_myself"; then
68029   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
68030   exit 1
68031 fi
68032 
68033 # Unset variables that we do not need and which cause bugs (e.g. in
68034 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
68035 # suppresses any "Segmentation fault" message there.  '((' could
68036 # trigger a bug in pdksh 5.2.14.
68037 for as_var in BASH_ENV ENV MAIL MAILPATH
68038 do eval test x\${$as_var+set} = xset \
68039   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68040 done
68041 PS1='$ '
68042 PS2='> '
68043 PS4='+ '
68044 
68045 # NLS nuisances.
68046 LC_ALL=C
68047 export LC_ALL
68048 LANGUAGE=C
68049 export LANGUAGE
68050 
68051 # CDPATH.
68052 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
68053 
68054 
68055 # as_fn_error STATUS ERROR [LINENO LOG_FD]
68056 # ----------------------------------------
68057 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
68058 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
68059 # script with STATUS, using 1 if that was 0.
68060 as_fn_error ()
68061 {
68062   as_status=$1; test $as_status -eq 0 && as_status=1
68063   if test "$4"; then
68064     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
68065     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
68066   fi
68067   $as_echo "$as_me: error: $2" >&2
68068   as_fn_exit $as_status
68069 } # as_fn_error
68070 
68071 
68072 # as_fn_set_status STATUS
68073 # -----------------------
68074 # Set $? to STATUS, without forking.
68075 as_fn_set_status ()
68076 {
68077   return $1
68078 } # as_fn_set_status
68079 
68080 # as_fn_exit STATUS
68081 # -----------------
68082 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
68083 as_fn_exit ()
68084 {
68085   set +e
68086   as_fn_set_status $1
68087   exit $1
68088 } # as_fn_exit
68089 
68090 # as_fn_unset VAR
68091 # ---------------
68092 # Portably unset VAR.
68093 as_fn_unset ()
68094 {
68095   { eval $1=; unset $1;}
68096 }
68097 as_unset=as_fn_unset
68098 # as_fn_append VAR VALUE
68099 # ----------------------
68100 # Append the text in VALUE to the end of the definition contained in VAR. Take
68101 # advantage of any shell optimizations that allow amortized linear growth over
68102 # repeated appends, instead of the typical quadratic growth present in naive
68103 # implementations.
68104 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
68105   eval 'as_fn_append ()
68106   {
68107     eval $1+=\$2
68108   }'
68109 else
68110   as_fn_append ()
68111   {
68112     eval $1=\$$1\$2
68113   }
68114 fi # as_fn_append
68115 
68116 # as_fn_arith ARG...
68117 # ------------------
68118 # Perform arithmetic evaluation on the ARGs, and store the result in the
68119 # global $as_val. Take advantage of shells that can avoid forks. The arguments
68120 # must be portable across $(()) and expr.
68121 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
68122   eval 'as_fn_arith ()
68123   {
68124     as_val=$(( $* ))
68125   }'
68126 else
68127   as_fn_arith ()
68128   {
68129     as_val=`expr "$@" || test $? -eq 1`
68130   }
68131 fi # as_fn_arith
68132 
68133 
68134 if expr a : '\(a\)' >/dev/null 2>&1 &&
68135    test "X`expr 00001 : '.*\(...\)'`" = X001; then
68136   as_expr=expr
68137 else
68138   as_expr=false
68139 fi
68140 
68141 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
68142   as_basename=basename
68143 else
68144   as_basename=false
68145 fi
68146 
68147 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
68148   as_dirname=dirname
68149 else
68150   as_dirname=false
68151 fi
68152 
68153 as_me=`$as_basename -- "$0" ||
68154 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68155          X"$0" : 'X\(//\)$' \| \
68156          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
68157 $as_echo X/"$0" |
68158     sed '/^.*\/\([^/][^/]*\)\/*$/{
68159             s//\1/
68160             q
68161           }
68162           /^X\/\(\/\/\)$/{
68163             s//\1/
68164             q
68165           }
68166           /^X\/\(\/\).*/{
68167             s//\1/
68168             q
68169           }
68170           s/.*/./; q'`
68171 
68172 # Avoid depending upon Character Ranges.
68173 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
68174 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
68175 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
68176 as_cr_digits='0123456789'
68177 as_cr_alnum=$as_cr_Letters$as_cr_digits
68178 
68179 ECHO_C= ECHO_N= ECHO_T=
68180 case `echo -n x` in #(((((
68181 -n*)
68182   case `echo 'xy\c'` in
68183   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
68184   xy)  ECHO_C='\c';;
68185   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
68186        ECHO_T=' ';;
68187   esac;;
68188 *)
68189   ECHO_N='-n';;
68190 esac
68191 
68192 rm -f conf$$ conf$$.exe conf$$.file
68193 if test -d conf$$.dir; then
68194   rm -f conf$$.dir/conf$$.file
68195 else
68196   rm -f conf$$.dir
68197   mkdir conf$$.dir 2>/dev/null
68198 fi
68199 if (echo >conf$$.file) 2>/dev/null; then
68200   if ln -s conf$$.file conf$$ 2>/dev/null; then
68201     as_ln_s='ln -s'
68202     # ... but there are two gotchas:
68203     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
68204     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
68205     # In both cases, we have to default to `cp -pR'.
68206     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
68207       as_ln_s='cp -pR'
68208   elif ln conf$$.file conf$$ 2>/dev/null; then
68209     as_ln_s=ln
68210   else
68211     as_ln_s='cp -pR'
68212   fi
68213 else
68214   as_ln_s='cp -pR'
68215 fi
68216 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
68217 rmdir conf$$.dir 2>/dev/null
68218 
68219 
68220 # as_fn_mkdir_p
68221 # -------------
68222 # Create "$as_dir" as a directory, including parents if necessary.
68223 as_fn_mkdir_p ()
68224 {
68225 
68226   case $as_dir in #(
68227   -*) as_dir=./$as_dir;;
68228   esac
68229   test -d "$as_dir" || eval $as_mkdir_p || {
68230     as_dirs=
68231     while :; do
68232       case $as_dir in #(
68233       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68234       *) as_qdir=$as_dir;;
68235       esac
68236       as_dirs="'$as_qdir' $as_dirs"
68237       as_dir=`$as_dirname -- "$as_dir" ||
68238 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68239          X"$as_dir" : 'X\(//\)[^/]' \| \
68240          X"$as_dir" : 'X\(//\)$' \| \
68241          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68242 $as_echo X"$as_dir" |
68243     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68244             s//\1/
68245             q
68246           }
68247           /^X\(\/\/\)[^/].*/{
68248             s//\1/
68249             q
68250           }
68251           /^X\(\/\/\)$/{
68252             s//\1/
68253             q
68254           }
68255           /^X\(\/\).*/{
68256             s//\1/
68257             q
68258           }
68259           s/.*/./; q'`
68260       test -d "$as_dir" && break
68261     done
68262     test -z "$as_dirs" || eval "mkdir $as_dirs"
68263   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68264 
68265 
68266 } # as_fn_mkdir_p
68267 if mkdir -p . 2>/dev/null; then
68268   as_mkdir_p='mkdir -p "$as_dir"'
68269 else
68270   test -d ./-p && rmdir ./-p
68271   as_mkdir_p=false
68272 fi
68273 
68274 
68275 # as_fn_executable_p FILE
68276 # -----------------------
68277 # Test if FILE is an executable regular file.
68278 as_fn_executable_p ()
68279 {
68280   test -f "$1" && test -x "$1"
68281 } # as_fn_executable_p
68282 as_test_x='test -x'
68283 as_executable_p=as_fn_executable_p
68284 
68285 # Sed expression to map a string onto a valid CPP name.
68286 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68287 
68288 # Sed expression to map a string onto a valid variable name.
68289 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68290 
68291 
68292 exec 6>&1
68293 ## ----------------------------------- ##
68294 ## Main body of $CONFIG_STATUS script. ##
68295 ## ----------------------------------- ##
68296 _ASEOF
68297 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68298 
68299 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68300 # Save the log message, to keep $0 and so on meaningful, and to
68301 # report actual input values of CONFIG_FILES etc. instead of their
68302 # values after options handling.
68303 ac_log="
68304 This file was extended by OpenJDK $as_me jdk9, which was
68305 generated by GNU Autoconf 2.69.  Invocation command line was
68306 
68307   CONFIG_FILES    = $CONFIG_FILES
68308   CONFIG_HEADERS  = $CONFIG_HEADERS
68309   CONFIG_LINKS    = $CONFIG_LINKS
68310   CONFIG_COMMANDS = $CONFIG_COMMANDS
68311   $ $0 $@
68312 
68313 on `(hostname || uname -n) 2>/dev/null | sed 1q`
68314 "
68315 
68316 _ACEOF
68317 
68318 case $ac_config_files in *"
68319 "*) set x $ac_config_files; shift; ac_config_files=$*;;
68320 esac
68321 
68322 
68323 
68324 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68325 # Files that config.status was made for.
68326 config_files="$ac_config_files"
68327 
68328 _ACEOF
68329 
68330 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68331 ac_cs_usage="\
68332 \`$as_me' instantiates files and other configuration actions
68333 from templates according to the current configuration.  Unless the files
68334 and actions are specified as TAGs, all are instantiated by default.
68335 
68336 Usage: $0 [OPTION]... [TAG]...
68337 
68338   -h, --help       print this help, then exit
68339   -V, --version    print version number and configuration settings, then exit
68340       --config     print configuration, then exit
68341   -q, --quiet, --silent
68342                    do not print progress messages
68343   -d, --debug      don't remove temporary files
68344       --recheck    update $as_me by reconfiguring in the same conditions
68345       --file=FILE[:TEMPLATE]
68346                    instantiate the configuration file FILE
68347 
68348 Configuration files:
68349 $config_files
68350 
68351 Report bugs to <build-dev@openjdk.java.net>.
68352 OpenJDK home page: <http://openjdk.java.net>."
68353 
68354 _ACEOF
68355 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68356 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68357 ac_cs_version="\\
68358 OpenJDK config.status jdk9
68359 configured by $0, generated by GNU Autoconf 2.69,
68360   with options \\"\$ac_cs_config\\"
68361 
68362 Copyright (C) 2012 Free Software Foundation, Inc.
68363 This config.status script is free software; the Free Software Foundation
68364 gives unlimited permission to copy, distribute and modify it."
68365 
68366 ac_pwd='$ac_pwd'
68367 srcdir='$srcdir'
68368 AWK='$AWK'
68369 test -n "\$AWK" || AWK=awk
68370 _ACEOF
68371 
68372 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68373 # The default lists apply if the user does not specify any file.
68374 ac_need_defaults=:
68375 while test $# != 0
68376 do
68377   case $1 in
68378   --*=?*)
68379     ac_option=`expr "X$1" : 'X\([^=]*\)='`
68380     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68381     ac_shift=:
68382     ;;
68383   --*=)
68384     ac_option=`expr "X$1" : 'X\([^=]*\)='`
68385     ac_optarg=
68386     ac_shift=:
68387     ;;
68388   *)
68389     ac_option=$1
68390     ac_optarg=$2
68391     ac_shift=shift
68392     ;;
68393   esac
68394 
68395   case $ac_option in
68396   # Handling of the options.
68397   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68398     ac_cs_recheck=: ;;
68399   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68400     $as_echo "$ac_cs_version"; exit ;;
68401   --config | --confi | --conf | --con | --co | --c )
68402     $as_echo "$ac_cs_config"; exit ;;
68403   --debug | --debu | --deb | --de | --d | -d )
68404     debug=: ;;
68405   --file | --fil | --fi | --f )
68406     $ac_shift
68407     case $ac_optarg in
68408     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68409     '') as_fn_error $? "missing file argument" ;;
68410     esac
68411     as_fn_append CONFIG_FILES " '$ac_optarg'"
68412     ac_need_defaults=false;;
68413   --he | --h |  --help | --hel | -h )
68414     $as_echo "$ac_cs_usage"; exit ;;
68415   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68416   | -silent | --silent | --silen | --sile | --sil | --si | --s)
68417     ac_cs_silent=: ;;
68418 
68419   # This is an error.
68420   -*) as_fn_error $? "unrecognized option: \`$1'
68421 Try \`$0 --help' for more information." ;;
68422 
68423   *) as_fn_append ac_config_targets " $1"
68424      ac_need_defaults=false ;;
68425 
68426   esac
68427   shift
68428 done
68429 
68430 ac_configure_extra_args=
68431 
68432 if $ac_cs_silent; then
68433   exec 6>/dev/null
68434   ac_configure_extra_args="$ac_configure_extra_args --silent"
68435 fi
68436 
68437 _ACEOF
68438 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68439 if \$ac_cs_recheck; then
68440   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68441   shift
68442   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68443   CONFIG_SHELL='$SHELL'
68444   export CONFIG_SHELL
68445   exec "\$@"
68446 fi
68447 
68448 _ACEOF
68449 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68450 exec 5>>config.log
68451 {
68452   echo
68453   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68454 ## Running $as_me. ##
68455 _ASBOX
68456   $as_echo "$ac_log"
68457 } >&5
68458 
68459 _ACEOF
68460 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68461 _ACEOF
68462 
68463 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68464 
68465 # Handling of arguments.
68466 for ac_config_target in $ac_config_targets
68467 do
68468   case $ac_config_target in
68469     "$OUTPUTDIR/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68470     "$OUTPUTDIR/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68471     "$OUTPUTDIR/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68472     "$OUTPUTDIR/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68473     "$OUTPUTDIR/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68474 
68475   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68476   esac
68477 done
68478 
68479 
68480 # If the user did not use the arguments to specify the items to instantiate,
68481 # then the envvar interface is used.  Set only those that are not.
68482 # We use the long form for the default assignment because of an extremely
68483 # bizarre bug on SunOS 4.1.3.
68484 if $ac_need_defaults; then
68485   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68486 fi
68487 
68488 # Have a temporary directory for convenience.  Make it in the build tree
68489 # simply because there is no reason against having it here, and in addition,
68490 # creating and moving files from /tmp can sometimes cause problems.
68491 # Hook for its removal unless debugging.
68492 # Note that there is a small window in which the directory will not be cleaned:
68493 # after its creation but before its name has been assigned to `$tmp'.
68494 $debug ||
68495 {
68496   tmp= ac_tmp=
68497   trap 'exit_status=$?
68498   : "${ac_tmp:=$tmp}"
68499   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68500 ' 0
68501   trap 'as_fn_exit 1' 1 2 13 15
68502 }
68503 # Create a (secure) tmp directory for tmp files.
68504 
68505 {
68506   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68507   test -d "$tmp"
68508 }  ||
68509 {
68510   tmp=./conf$$-$RANDOM
68511   (umask 077 && mkdir "$tmp")
68512 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68513 ac_tmp=$tmp
68514 
68515 # Set up the scripts for CONFIG_FILES section.
68516 # No need to generate them if there are no CONFIG_FILES.
68517 # This happens for instance with `./config.status config.h'.
68518 if test -n "$CONFIG_FILES"; then
68519 
68520 
68521 ac_cr=`echo X | tr X '\015'`
68522 # On cygwin, bash can eat \r inside `` if the user requested igncr.
68523 # But we know of no other shell where ac_cr would be empty at this
68524 # point, so we can use a bashism as a fallback.
68525 if test "x$ac_cr" = x; then
68526   eval ac_cr=\$\'\\r\'
68527 fi
68528 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68529 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68530   ac_cs_awk_cr='\\r'
68531 else
68532   ac_cs_awk_cr=$ac_cr
68533 fi
68534 
68535 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68536 _ACEOF
68537 
68538 
68539 {
68540   echo "cat >conf$$subs.awk <<_ACEOF" &&
68541   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68542   echo "_ACEOF"
68543 } >conf$$subs.sh ||
68544   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68545 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68546 ac_delim='%!_!# '
68547 for ac_last_try in false false false false false :; do
68548   . ./conf$$subs.sh ||
68549     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68550 
68551   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68552   if test $ac_delim_n = $ac_delim_num; then
68553     break
68554   elif $ac_last_try; then
68555     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68556   else
68557     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68558   fi
68559 done
68560 rm -f conf$$subs.sh
68561 
68562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68563 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68564 _ACEOF
68565 sed -n '
68566 h
68567 s/^/S["/; s/!.*/"]=/
68568 p
68569 g
68570 s/^[^!]*!//
68571 :repl
68572 t repl
68573 s/'"$ac_delim"'$//
68574 t delim
68575 :nl
68576 h
68577 s/\(.\{148\}\)..*/\1/
68578 t more1
68579 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68580 p
68581 n
68582 b repl
68583 :more1
68584 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68585 p
68586 g
68587 s/.\{148\}//
68588 t nl
68589 :delim
68590 h
68591 s/\(.\{148\}\)..*/\1/
68592 t more2
68593 s/["\\]/\\&/g; s/^/"/; s/$/"/
68594 p
68595 b
68596 :more2
68597 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68598 p
68599 g
68600 s/.\{148\}//
68601 t delim
68602 ' <conf$$subs.awk | sed '
68603 /^[^""]/{
68604   N
68605   s/\n//
68606 }
68607 ' >>$CONFIG_STATUS || ac_write_fail=1
68608 rm -f conf$$subs.awk
68609 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68610 _ACAWK
68611 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68612   for (key in S) S_is_set[key] = 1
68613   FS = ""
68614 
68615 }
68616 {
68617   line = $ 0
68618   nfields = split(line, field, "@")
68619   substed = 0
68620   len = length(field[1])
68621   for (i = 2; i < nfields; i++) {
68622     key = field[i]
68623     keylen = length(key)
68624     if (S_is_set[key]) {
68625       value = S[key]
68626       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68627       len += length(value) + length(field[++i])
68628       substed = 1
68629     } else
68630       len += 1 + keylen
68631   }
68632 
68633   print line
68634 }
68635 
68636 _ACAWK
68637 _ACEOF
68638 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68639 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68640   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68641 else
68642   cat
68643 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68644   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68645 _ACEOF
68646 
68647 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68648 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68649 # trailing colons and then remove the whole line if VPATH becomes empty
68650 # (actually we leave an empty line to preserve line numbers).
68651 if test "x$srcdir" = x.; then
68652   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
68653 h
68654 s///
68655 s/^/:/
68656 s/[      ]*$/:/
68657 s/:\$(srcdir):/:/g
68658 s/:\${srcdir}:/:/g
68659 s/:@srcdir@:/:/g
68660 s/^:*//
68661 s/:*$//
68662 x
68663 s/\(=[   ]*\).*/\1/
68664 G
68665 s/\n//
68666 s/^[^=]*=[       ]*$//
68667 }'
68668 fi
68669 
68670 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68671 fi # test -n "$CONFIG_FILES"
68672 
68673 
68674 eval set X "  :F $CONFIG_FILES      "
68675 shift
68676 for ac_tag
68677 do
68678   case $ac_tag in
68679   :[FHLC]) ac_mode=$ac_tag; continue;;
68680   esac
68681   case $ac_mode$ac_tag in
68682   :[FHL]*:*);;
68683   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68684   :[FH]-) ac_tag=-:-;;
68685   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68686   esac
68687   ac_save_IFS=$IFS
68688   IFS=:
68689   set x $ac_tag
68690   IFS=$ac_save_IFS
68691   shift
68692   ac_file=$1
68693   shift
68694 
68695   case $ac_mode in
68696   :L) ac_source=$1;;
68697   :[FH])
68698     ac_file_inputs=
68699     for ac_f
68700     do
68701       case $ac_f in
68702       -) ac_f="$ac_tmp/stdin";;
68703       *) # Look for the file first in the build tree, then in the source tree
68704          # (if the path is not absolute).  The absolute path cannot be DOS-style,
68705          # because $ac_f cannot contain `:'.
68706          test -f "$ac_f" ||
68707            case $ac_f in
68708            [\\/$]*) false;;
68709            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68710            esac ||
68711            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68712       esac
68713       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68714       as_fn_append ac_file_inputs " '$ac_f'"
68715     done
68716 
68717     # Let's still pretend it is `configure' which instantiates (i.e., don't
68718     # use $as_me), people would be surprised to read:
68719     #    /* config.h.  Generated by config.status.  */
68720     configure_input='Generated from '`
68721           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68722         `' by configure.'
68723     if test x"$ac_file" != x-; then
68724       configure_input="$ac_file.  $configure_input"
68725       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68726 $as_echo "$as_me: creating $ac_file" >&6;}
68727     fi
68728     # Neutralize special characters interpreted by sed in replacement strings.
68729     case $configure_input in #(
68730     *\&* | *\|* | *\\* )
68731        ac_sed_conf_input=`$as_echo "$configure_input" |
68732        sed 's/[\\\\&|]/\\\\&/g'`;; #(
68733     *) ac_sed_conf_input=$configure_input;;
68734     esac
68735 
68736     case $ac_tag in
68737     *:-:* | *:-) cat >"$ac_tmp/stdin" \
68738       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68739     esac
68740     ;;
68741   esac
68742 
68743   ac_dir=`$as_dirname -- "$ac_file" ||
68744 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68745          X"$ac_file" : 'X\(//\)[^/]' \| \
68746          X"$ac_file" : 'X\(//\)$' \| \
68747          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68748 $as_echo X"$ac_file" |
68749     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68750             s//\1/
68751             q
68752           }
68753           /^X\(\/\/\)[^/].*/{
68754             s//\1/
68755             q
68756           }
68757           /^X\(\/\/\)$/{
68758             s//\1/
68759             q
68760           }
68761           /^X\(\/\).*/{
68762             s//\1/
68763             q
68764           }
68765           s/.*/./; q'`
68766   as_dir="$ac_dir"; as_fn_mkdir_p
68767   ac_builddir=.
68768 
68769 case "$ac_dir" in
68770 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68771 *)
68772   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68773   # A ".." for each directory in $ac_dir_suffix.
68774   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68775   case $ac_top_builddir_sub in
68776   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68777   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68778   esac ;;
68779 esac
68780 ac_abs_top_builddir=$ac_pwd
68781 ac_abs_builddir=$ac_pwd$ac_dir_suffix
68782 # for backward compatibility:
68783 ac_top_builddir=$ac_top_build_prefix
68784 
68785 case $srcdir in
68786   .)  # We are building in place.
68787     ac_srcdir=.
68788     ac_top_srcdir=$ac_top_builddir_sub
68789     ac_abs_top_srcdir=$ac_pwd ;;
68790   [\\/]* | ?:[\\/]* )  # Absolute name.
68791     ac_srcdir=$srcdir$ac_dir_suffix;
68792     ac_top_srcdir=$srcdir
68793     ac_abs_top_srcdir=$srcdir ;;
68794   *) # Relative name.
68795     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68796     ac_top_srcdir=$ac_top_build_prefix$srcdir
68797     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68798 esac
68799 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68800 
68801 
68802   case $ac_mode in
68803   :F)
68804   #
68805   # CONFIG_FILE
68806   #
68807 
68808 _ACEOF
68809 
68810 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68811 # If the template does not know about datarootdir, expand it.
68812 # FIXME: This hack should be removed a few years after 2.60.
68813 ac_datarootdir_hack=; ac_datarootdir_seen=
68814 ac_sed_dataroot='
68815 /datarootdir/ {
68816   p
68817   q
68818 }
68819 /@datadir@/p
68820 /@docdir@/p
68821 /@infodir@/p
68822 /@localedir@/p
68823 /@mandir@/p'
68824 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68825 *datarootdir*) ac_datarootdir_seen=yes;;
68826 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68827   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68828 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68829 _ACEOF
68830 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68831   ac_datarootdir_hack='
68832   s&@datadir@&$datadir&g
68833   s&@docdir@&$docdir&g
68834   s&@infodir@&$infodir&g
68835   s&@localedir@&$localedir&g
68836   s&@mandir@&$mandir&g
68837   s&\\\${datarootdir}&$datarootdir&g' ;;
68838 esac
68839 _ACEOF
68840 
68841 # Neutralize VPATH when `$srcdir' = `.'.
68842 # Shell code in configure.ac might set extrasub.
68843 # FIXME: do we really want to maintain this feature?
68844 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68845 ac_sed_extra="$ac_vpsub
68846 $extrasub
68847 _ACEOF
68848 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68849 :t
68850 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68851 s|@configure_input@|$ac_sed_conf_input|;t t
68852 s&@top_builddir@&$ac_top_builddir_sub&;t t
68853 s&@top_build_prefix@&$ac_top_build_prefix&;t t
68854 s&@srcdir@&$ac_srcdir&;t t
68855 s&@abs_srcdir@&$ac_abs_srcdir&;t t
68856 s&@top_srcdir@&$ac_top_srcdir&;t t
68857 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68858 s&@builddir@&$ac_builddir&;t t
68859 s&@abs_builddir@&$ac_abs_builddir&;t t
68860 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68861 $ac_datarootdir_hack
68862 "
68863 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68864   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68865 
68866 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68867   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68868   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
68869       "$ac_tmp/out"`; test -z "$ac_out"; } &&
68870   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68871 which seems to be undefined.  Please make sure it is defined" >&5
68872 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68873 which seems to be undefined.  Please make sure it is defined" >&2;}
68874 
68875   rm -f "$ac_tmp/stdin"
68876   case $ac_file in
68877   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68878   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68879   esac \
68880   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68881  ;;
68882 
68883 
68884 
68885   esac
68886 
68887 done # for ac_tag
68888 
68889 
68890 as_fn_exit 0
68891 _ACEOF
68892 ac_clean_files=$ac_clean_files_save
68893 
68894 test $ac_write_fail = 0 ||
68895   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68896 
68897 
68898 # configure is writing to config.log, and then calls config.status.
68899 # config.status does its own redirection, appending to config.log.
68900 # Unfortunately, on DOS this fails, as config.log is still kept open
68901 # by configure, so config.status won't be able to write to it; its
68902 # output is simply discarded.  So we exec the FD to /dev/null,
68903 # effectively closing config.log, so it can be properly (re)opened and
68904 # appended to by config.status.  When coming back to configure, we
68905 # need to make the FD available again.
68906 if test "$no_create" != yes; then
68907   ac_cs_success=:
68908   ac_config_status_args=
68909   test "$silent" = yes &&
68910     ac_config_status_args="$ac_config_status_args --quiet"
68911   exec 5>/dev/null
68912   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68913   exec 5>>config.log
68914   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68915   # would make configure fail if this is the last instruction.
68916   $ac_cs_success || as_fn_exit 1
68917 fi
68918 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68919   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68920 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68921 fi
68922 
68923 
68924 # After AC_OUTPUT, we need to do final work
68925 
68926 
68927   # Try to move config.log (generated by autoconf) to the configure-support directory.
68928   if test -e ./config.log; then
68929     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68930   fi
68931 
68932   # Rotate our log file (configure.log)
68933   if test -e "$OUTPUTDIR/configure.log.old"; then
68934     $RM -f "$OUTPUTDIR/configure.log.old"
68935   fi
68936   if test -e "$OUTPUTDIR/configure.log"; then
68937     $MV -f "$OUTPUTDIR/configure.log" "$OUTPUTDIR/configure.log.old" 2> /dev/null
68938   fi
68939 
68940   # Move configure.log from current directory to the build output root
68941   if test -e ./configure.log; then
68942     $MV -f ./configure.log "$OUTPUTDIR/configure.log" 2> /dev/null
68943   fi
68944 
68945   # Make the compare script executable
68946   $CHMOD +x $OUTPUTDIR/compare.sh
68947 
68948 
68949 # Finally output some useful information to the user
68950 
68951   # Finally output some useful information to the user
68952 
68953   printf "\n"
68954   printf "====================================================\n"
68955   if test "x$no_create" != "xyes"; then
68956     if test "x$IS_RECONFIGURE" != "xyes"; then
68957       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUTDIR"
68958     else
68959       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUTDIR"
68960     fi
68961   else
68962     if test "x$IS_RECONFIGURE" != "xyes"; then
68963       printf "A configuration has been successfully checked but not created\n"
68964     else
68965       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUTDIR"
68966     fi
68967   fi
68968   if test "x$CONFIGURE_COMMAND_LINE" != x; then
68969     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68970   else
68971     printf "using default settings.\n"
68972   fi
68973 
68974   printf "\n"
68975   printf "Configuration summary:\n"
68976   printf "* Debug level:    $DEBUG_LEVEL\n"
68977   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68978   printf "* JDK variant:    $JDK_VARIANT\n"
68979   printf "* JVM variants:   $JVM_VARIANTS\n"
68980   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68981   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68982 
68983   printf "\n"
68984   printf "Tools summary:\n"
68985   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68986     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68987   fi
68988   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68989   if test "x$TOOLCHAIN_VERSION" != "x"; then
68990     print_version=" $TOOLCHAIN_VERSION"
68991   fi
68992   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68993   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68994   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68995 
68996   printf "\n"
68997   printf "Build performance summary:\n"
68998   printf "* Cores to use:   $JOBS\n"
68999   printf "* Memory limit:   $MEMORY_SIZE MB\n"
69000   if test "x$CCACHE_STATUS" != "x"; then
69001     printf "* ccache status:  $CCACHE_STATUS\n"
69002   fi
69003   printf "\n"
69004 
69005   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
69006     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
69007     printf "will result in longer build times.\n"
69008     printf "\n"
69009   fi
69010 
69011   if test "x$FOUND_ALT_VARIABLES" != "x"; then
69012     printf "WARNING: You have old-style ALT_ environment variables set.\n"
69013     printf "These are not respected, and will be ignored. It is recommended\n"
69014     printf "that you clean your environment. The following variables are set:\n"
69015     printf "$FOUND_ALT_VARIABLES\n"
69016     printf "\n"
69017   fi
69018 
69019   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
69020     printf "WARNING: Your build output directory is not on a local disk.\n"
69021     printf "This will severely degrade build performance!\n"
69022     printf "It is recommended that you create an output directory on a local disk,\n"
69023     printf "and run the configure script again from that directory.\n"
69024     printf "\n"
69025   fi
69026 
69027   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
69028     printf "WARNING: The result of this configuration has overridden an older\n"
69029     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
69030     printf "proper build. Failure to do so might result in strange build problems.\n"
69031     printf "\n"
69032   fi
69033 
69034   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
69035     printf "WARNING: The result of this configuration was not saved.\n"
69036     printf "You should run without '--no-create | -n' to create the configuration.\n"
69037     printf "\n"
69038   fi
69039 
69040 
69041 
69042   # Locate config.log.
69043   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
69044     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
69045   elif test -e "./config.log"; then
69046     CONFIG_LOG_PATH="."
69047   fi
69048 
69049   if test -e "$CONFIG_LOG_PATH/config.log"; then
69050     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
69051     if test $? -eq 0; then
69052       printf "The following warnings were produced. Repeated here for convenience:\n"
69053       # We must quote sed expression (using []) to stop m4 from eating the [].
69054       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
69055       printf "\n"
69056     fi
69057   fi
69058